summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarco Crivellari <marco.crivellari@suse.com>2025-11-10 18:03:32 +0100
committerThomas Gleixner <tglx@kernel.org>2026-03-26 17:31:35 +0100
commit7eb28030f641d5bc7682c98602f896304efd31d2 (patch)
tree17eeeae18d04f4366d463956aa97f6f374e644e4 /kernel
parentb0473dcd4b1d7e2e44947e7ac1820c73a268821a (diff)
smp: Use system_percpu_wq instead of system_wq
When a caller enqueues a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() uses WORK_CPU_UNBOUND (used when no target CPU is specified). The same applies to schedule_work() that is using system_wq and queue_work(), which again makes use of WORK_CPU_UNBOUND. This lack of consistency cannot be addressed without refactoring the API. Continue the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue() flag in: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") and switch smp_call_on_cpu() to use system_percpu_wq because system_wq is going away once the ongoing workqueue restructuring is done. Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://patch.msgid.link/20251110170332.319314-1-marco.crivellari@suse.com
Diffstat (limited to 'kernel')
-rw-r--r--kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/smp.c b/kernel/smp.c
index 0fc4ff28ba79..6c77848d91f3 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -1185,7 +1185,7 @@ int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys)
if (cpu >= nr_cpu_ids || !cpu_online(cpu))
return -ENXIO;
- queue_work_on(cpu, system_wq, &sscs.work);
+ queue_work_on(cpu, system_percpu_wq, &sscs.work);
wait_for_completion(&sscs.done);
destroy_work_on_stack(&sscs.work);