From nobody Sat Jun 13 12:29:26 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91FB337A48A for ; Thu, 7 May 2026 13:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778159691; cv=none; b=k/6Bp/Ox2bBp7FeSs62P4bUgClRI+XBptl5K/fdVVMLBHM/uEzHACTLrhmPTIv5u2+y6Cb6LKom+i+dhKC9SWriw6Ef5D2EjCGYxBxlukoTUEHLWAoXSHBJoCDjFLtKfRmJOFZreL94CzrKsHdiCeC4/+VMFlt56IRvH52V2AkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778159691; c=relaxed/simple; bh=QV7hX/8k6q/3mqt6It6GSifNIqA0lXLbtMvSL2R1kT4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=hqXoxndluMxk1+ZAKM8dS6aJKVyng2sbAVIC78WKBtsfKUfQwsUuwXF0fNwv0AZIHGL9IQHWYY8/8leksPhnZh9xWKx/0s2zh1QdiB/iWeUK9UzblzeKDWCxbwI2xOw3sUu/m1F/XHCss2PbpDqivZpmyP4UYeogcACO6/jSWrQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=UE6pReEO; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="UE6pReEO" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so10640115e9.2 for ; Thu, 07 May 2026 06:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778159687; x=1778764487; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0aHr4jVrJBuk/fs3rKxhNRyKDeIrHsvxWAqAg9ExwjE=; b=UE6pReEOeD/+6n3qjycF9PWO4INFon/98p9NCCY96tMdB6gOrvTFFYiBvmPy0/OPCP VLMUT3lZlE3SxhY5/2L24aC5wtOzgOsgQ/0Yu/z0vM7SvXvEbQymSn8Abi8gz281pdHa xAQH060cGjzG+elMQ7NiqFyMh3dk7p0GoA7zMtxvL3k9wfcTDuYWTjUSfv//GFTo+RDR tBkDKoFDA1DO0JoqR3tw0R5cAj5SUQCm9TXDXI7wTi9gJWz1fZGSV88eTMtLiUlWKeHn MdiraKXoJFNQonq+qLXj0adJfKfD+zbfBJAzyvh43CRrObq8z9XhdYUZuZf2OsG3BB3L Qi9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778159687; x=1778764487; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0aHr4jVrJBuk/fs3rKxhNRyKDeIrHsvxWAqAg9ExwjE=; b=ay6zxdB7aA0FWAviCAqXRqiZL2myT2TtR+PcnX4K23JEuGSX6lFED1TTRDvUvjqtjr CBz74DMa0ZlIlHuuzR8G/60UgqPpd0v3N1r79eg/3XYQv1/lUI2AkNRflamJZg1OTQOS d5kZ0avFw2W7Uz6n7LkjURb/byqsjUVJP6TYA0iqS3LuGurdCYRuESmV9d4raSVVVOz8 EadWt7DnOaB9FcnH+FYRVk8W69OHBsF4GrJnBjZdqYdGyxKSPsl119ouIsjoSjs8PsBs lGk+0eSdwWclZOOIQ/IWGLjd+0zWYZuXQs8V3VH6xJorNGUhdOSfBxRZn2IPXSJorNmb orVQ== X-Gm-Message-State: AOJu0Yz74yXzQmfZON+pHFbCVlwAFfe6goOV9F8/u7VsmKscQg7dSMAT hHYfDFnqM9OZhCpHJO5FdCeL8tsAX77/45tq5NbrST7j4T09ooOY0pWzMA8LhjO7nSgPXpIrz9n CBbW5cwM= X-Gm-Gg: AeBDietKGwhtRAnjBNIz5uGVVx1xGpPwil5+n64gC3+PasjnakhTKegAItm4Orjj5xJ MB5PSa6wv+hVJvO2ujpnGW/PEzH5aZd4Oh9JmkClx/MR8cZpYF3++dVyqlwI3uGV3AwNmcY6yQ7 vmm9ji/SKLC1CGIBYNt+9NOrkNeCe+0a5f//vhQ7Jl7EqcUwYWQTdtY4Aye/dunpFRnvymv9NMH JYJPNnBaKjfSRGNuv6VXBGK6s7R7gpluqTPkntWShjS0+D7BHgowv6BcsvbwaoCbIyhrESONATy 3x70h1EzYpgWR4KYlWqMeIVMAZZEVeW5CZNbYaZnSUWiB7U2BaToFnzoSIkwefBoGupnL3Y7s/H tHltVYlQNusqOleepOjXPUQ2KRFnkgkL2STo3nK8AVbWByTrPP51aDXyLlNXr+royhe37Ba1q/i xnNkefrAaXfzfhzSjvsEvedMBKGSTVmrOVxJDTv+NVmDPAmhG9HwesKyM8fg== X-Received: by 2002:a05:600c:a305:b0:489:1c5f:3a9e with SMTP id 5b1f17b1804b1-48e51f36febmr85339865e9.13.1778159686601; Thu, 07 May 2026 06:14:46 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e530b05d9sm57179985e9.3.2026.05.07.06.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 06:14:46 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Vinod Koul , Neil Armstrong Subject: [RFC PATCH] phy: ti: tusb1210: Move long delayed work on system_dfl_long_wq Date: Thu, 7 May 2026 15:14:39 +0200 Message-ID: <20260507131439.264906-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Currently the code enqueue work items using {queue|mod}_delayed_work(), using system_long_wq. This workqueue should be used when long works are expected and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Signed-off-by: Marco Crivellari --- drivers/phy/ti/phy-tusb1210.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/ti/phy-tusb1210.c b/drivers/phy/ti/phy-tusb1210.c index c3ae9d7948d7..9956921c094b 100644 --- a/drivers/phy/ti/phy-tusb1210.c +++ b/drivers/phy/ti/phy-tusb1210.c @@ -197,7 +197,7 @@ static void tusb1210_chg_det_set_state(struct tusb1210 = *tusb, tusb1210_chg_det_states[new_state], delay_ms); =20 tusb->chg_det_state =3D new_state; - mod_delayed_work(system_long_wq, &tusb->chg_det_work, + mod_delayed_work(system_dfl_long_wq, &tusb->chg_det_work, msecs_to_jiffies(delay_ms)); } =20 @@ -380,7 +380,7 @@ static int tusb1210_psy_notifier(struct notifier_block = *nb, struct power_supply *psy =3D ptr; =20 if (psy !=3D tusb->psy && psy->desc->type =3D=3D POWER_SUPPLY_TYPE_USB) - queue_delayed_work(system_long_wq, &tusb->chg_det_work, 0); + queue_delayed_work(system_dfl_long_wq, &tusb->chg_det_work, 0); =20 return NOTIFY_OK; } @@ -458,7 +458,7 @@ static void tusb1210_probe_charger_detect(struct tusb12= 10 *tusb) */ tusb->chg_det_state =3D TUSB1210_CHG_DET_DISCONNECTED; INIT_DELAYED_WORK(&tusb->chg_det_work, tusb1210_chg_det_work); - queue_delayed_work(system_long_wq, &tusb->chg_det_work, 2 * HZ); + queue_delayed_work(system_dfl_long_wq, &tusb->chg_det_work, 2 * HZ); =20 tusb->psy_nb.notifier_call =3D tusb1210_psy_notifier; power_supply_reg_notifier(&tusb->psy_nb); --=20 2.53.0