Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: cfg80211: replace use of system_unbound_wq with system_dfl_wq

Currently if a user enqueues a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.

This lack of consistency cannot be addressed without refactoring the API.
For more details see the Link tag below.

This continues 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")

Switch to using system_dfl_wq because system_unbound_wq is going away as part of
a workqueue restructuring.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Link: https://patch.msgid.link/20251113162032.394804-4-marco.crivellari@suse.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Marco Crivellari and committed by
Johannes Berg
fec4d9d6 e4582bdf

+3 -3
+2 -2
net/wireless/core.c
··· 431 431 if (wk) { 432 432 list_del_init(&wk->entry); 433 433 if (!list_empty(&rdev->wiphy_work_list)) 434 - queue_work(system_unbound_wq, work); 434 + queue_work(system_dfl_wq, work); 435 435 spin_unlock_irq(&rdev->wiphy_work_lock); 436 436 437 437 trace_wiphy_work_run(&rdev->wiphy, wk); ··· 1713 1713 list_add_tail(&work->entry, &rdev->wiphy_work_list); 1714 1714 spin_unlock_irqrestore(&rdev->wiphy_work_lock, flags); 1715 1715 1716 - queue_work(system_unbound_wq, &rdev->wiphy_work); 1716 + queue_work(system_dfl_wq, &rdev->wiphy_work); 1717 1717 } 1718 1718 EXPORT_SYMBOL_GPL(wiphy_work_queue); 1719 1719
+1 -1
net/wireless/sysfs.c
··· 137 137 if (rdev->wiphy.registered && rdev->ops->resume) 138 138 ret = rdev_resume(rdev); 139 139 rdev->suspended = false; 140 - queue_work(system_unbound_wq, &rdev->wiphy_work); 140 + queue_work(system_dfl_wq, &rdev->wiphy_work); 141 141 wiphy_unlock(&rdev->wiphy); 142 142 143 143 if (ret)