* [PATCH] wifi: ipw2x00: replace use of system_unbound_wq with system_dfl_wq
@ 2025-11-14 9:50 Marco Crivellari
2025-11-20 9:28 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Marco Crivellari @ 2025-11-14 9:50 UTC (permalink / raw)
To: linux-kernel, linux-wireless
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Stanislav Yakovlev
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.
system_unbound_wq should be the default workqueue so as not to enforce
locality constraints for random work whenever it's not required.
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>
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 6 +++---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 215814861cbd..c7c5bc0f1650 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -2143,7 +2143,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
/* Make sure the RF Kill check timer is running */
priv->stop_rf_kill = 0;
- mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
+ mod_delayed_work(system_percpu_wq, &priv->rf_kill, round_jiffies_relative(HZ));
}
static void ipw2100_scan_event(struct work_struct *work)
@@ -2170,7 +2170,7 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
round_jiffies_relative(msecs_to_jiffies(4000)));
} else {
priv->user_requested_scan = 0;
- mod_delayed_work(system_wq, &priv->scan_event, 0);
+ mod_delayed_work(system_percpu_wq, &priv->scan_event, 0);
}
}
@@ -4252,7 +4252,7 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio)
"disabled by HW switch\n");
/* Make sure the RF_KILL check timer is running */
priv->stop_rf_kill = 0;
- mod_delayed_work(system_wq, &priv->rf_kill,
+ mod_delayed_work(system_percpu_wq, &priv->rf_kill,
round_jiffies_relative(HZ));
} else
schedule_reset(priv);
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 24a5624ef207..09035a77e775 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -4415,7 +4415,7 @@ static void handle_scan_event(struct ipw_priv *priv)
round_jiffies_relative(msecs_to_jiffies(4000)));
} else {
priv->user_requested_scan = 0;
- mod_delayed_work(system_wq, &priv->scan_event, 0);
+ mod_delayed_work(system_percpu_wq, &priv->scan_event, 0);
}
}
--
2.51.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ipw2x00: replace use of system_unbound_wq with system_dfl_wq
2025-11-14 9:50 [PATCH] wifi: ipw2x00: replace use of system_unbound_wq with system_dfl_wq Marco Crivellari
@ 2025-11-20 9:28 ` Johannes Berg
2025-11-20 9:31 ` Marco Crivellari
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2025-11-20 9:28 UTC (permalink / raw)
To: Marco Crivellari, linux-kernel, linux-wireless
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Stanislav Yakovlev
The subject and this:
> Switch to using system_dfl_wq because system_unbound_wq is going away as
> part of a workqueue restructuring.
>
doesn't match what you actually do:
> - mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
> + mod_delayed_work(system_percpu_wq, &priv->rf_kill, round_jiffies_relative(HZ));
>
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ipw2x00: replace use of system_unbound_wq with system_dfl_wq
2025-11-20 9:28 ` Johannes Berg
@ 2025-11-20 9:31 ` Marco Crivellari
0 siblings, 0 replies; 3+ messages in thread
From: Marco Crivellari @ 2025-11-20 9:31 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-kernel, linux-wireless, Tejun Heo, Lai Jiangshan,
Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
Stanislav Yakovlev
On Thu, Nov 20, 2025 at 10:28 AM Johannes Berg
<johannes@sipsolutions.net> wrote:
>
> The subject and this:
>
> > Switch to using system_dfl_wq because system_unbound_wq is going away as
> > part of a workqueue restructuring.
> >
>
> doesn't match what you actually do:
>
> > - mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
> > + mod_delayed_work(system_percpu_wq, &priv->rf_kill, round_jiffies_relative(HZ));
> >
>
> johannes
Sorry Johannes, wrong copy and paste, I will send a fixed v2.
Thanks!
--
Marco Crivellari
L3 Support Engineer, Technology & Product
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-20 9:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-14 9:50 [PATCH] wifi: ipw2x00: replace use of system_unbound_wq with system_dfl_wq Marco Crivellari
2025-11-20 9:28 ` Johannes Berg
2025-11-20 9:31 ` 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®