mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: commit128ea9f6cc("workqueue: Add system_percpu_wq and system_dfl_wq") commit930c2ea566("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>
This commit is contained in:
committed by
Johannes Berg
parent
e4582bdf51
commit
fec4d9d6ff
@@ -431,7 +431,7 @@ static void cfg80211_wiphy_work(struct work_struct *work)
|
||||
if (wk) {
|
||||
list_del_init(&wk->entry);
|
||||
if (!list_empty(&rdev->wiphy_work_list))
|
||||
queue_work(system_unbound_wq, work);
|
||||
queue_work(system_dfl_wq, work);
|
||||
spin_unlock_irq(&rdev->wiphy_work_lock);
|
||||
|
||||
trace_wiphy_work_run(&rdev->wiphy, wk);
|
||||
@@ -1713,7 +1713,7 @@ void wiphy_work_queue(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
list_add_tail(&work->entry, &rdev->wiphy_work_list);
|
||||
spin_unlock_irqrestore(&rdev->wiphy_work_lock, flags);
|
||||
|
||||
queue_work(system_unbound_wq, &rdev->wiphy_work);
|
||||
queue_work(system_dfl_wq, &rdev->wiphy_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wiphy_work_queue);
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ static int wiphy_resume(struct device *dev)
|
||||
if (rdev->wiphy.registered && rdev->ops->resume)
|
||||
ret = rdev_resume(rdev);
|
||||
rdev->suspended = false;
|
||||
queue_work(system_unbound_wq, &rdev->wiphy_work);
|
||||
queue_work(system_dfl_wq, &rdev->wiphy_work);
|
||||
wiphy_unlock(&rdev->wiphy);
|
||||
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user