* [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq
@ 2026-05-15 14:58 Marco Crivellari
2026-05-28 12:11 ` Ilpo Järvinen
0 siblings, 1 reply; 3+ messages in thread
From: Marco Crivellari @ 2026-05-15 14:58 UTC (permalink / raw)
To: linux-kernel, platform-driver-x86
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Hans de Goede, Ilpo Jarvinen
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_wq, which will be deprecated soon and replaced by
system_percpu_wq.
commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
The function(s) mentioned earlier, 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.
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_wq with system_dfl_wq so that the work may benefit from
scheduler task placement.
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
drivers/platform/x86/hp/hp-wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 24c151289dd3..b7c12f943770 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -2388,7 +2388,7 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv)
ret = hp_wmi_fan_speed_max_set(1);
if (ret < 0)
return ret;
- mod_delayed_work(system_wq, &priv->keep_alive_dwork,
+ mod_delayed_work(system_dfl_wq, &priv->keep_alive_dwork,
secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));
return 0;
case PWM_MODE_MANUAL:
@@ -2397,7 +2397,7 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv)
ret = hp_wmi_fan_speed_set(priv, pwm_to_rpm(priv->pwm, priv));
if (ret < 0)
return ret;
- mod_delayed_work(system_wq, &priv->keep_alive_dwork,
+ mod_delayed_work(system_dfl_wq, &priv->keep_alive_dwork,
secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));
return 0;
case PWM_MODE_AUTO:
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq
2026-05-15 14:58 [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq Marco Crivellari
@ 2026-05-28 12:11 ` Ilpo Järvinen
2026-05-28 12:17 ` Marco Crivellari
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2026-05-28 12:11 UTC (permalink / raw)
To: linux-kernel, platform-driver-x86, Marco Crivellari
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Hans de Goede
On Fri, 15 May 2026 16:58:51 +0200, Marco Crivellari wrote:
> Currently the code enqueue work items using {queue|mod}_delayed_work(),
> using system_wq, which will be deprecated soon and replaced by
> system_percpu_wq.
>
> commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
>
> The function(s) mentioned earlier, end up calling __queue_delayed_work(),
> which set a global timer that could fire anywhere, enqueuing the work
> where the timer fired.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: Move delayed work on system_dfl_wq
commit: 5a3feefbcfa652e65b9259708222dd31d180eb33
--
i.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq
2026-05-28 12:11 ` Ilpo Järvinen
@ 2026-05-28 12:17 ` Marco Crivellari
0 siblings, 0 replies; 3+ messages in thread
From: Marco Crivellari @ 2026-05-28 12:17 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: linux-kernel, platform-driver-x86, Tejun Heo, Lai Jiangshan,
Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
Hans de Goede
On Thu, May 28, 2026 at 2:11 PM Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com> wrote:
> [...]
>
>
> Thank you for your contribution, it has been applied to my local
> review-ilpo-next branch. Note it will show up in the public
> platform-drivers-x86/review-ilpo-next branch only once I've pushed my
> local branch there, which might take a while.
>
> The list of commits applied:
> [1/1] platform/x86: Move delayed work on system_dfl_wq
> commit: 5a3feefbcfa652e65b9259708222dd31d180eb33
Many thanks!
--
Marco Crivellari
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-28 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-15 14:58 [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq Marco Crivellari
2026-05-28 12:11 ` Ilpo Järvinen
2026-05-28 12:17 ` Marco Crivellari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®