* [PATCH 1/3] drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq
2025-10-30 16:20 [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
@ 2025-10-30 16:20 ` Marco Crivellari
2025-10-30 16:20 ` [PATCH 2/3] drm/probe-helper: replace use of system_wq with system_percpu_wq Marco Crivellari
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Marco Crivellari @ 2025-10-30 16:20 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Currently if a user enqueue 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.
Adding system_dfl_wq to encourage its use when unbound work should be used.
The old system_unbound_wq will be kept for a few release cycles.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
drivers/gpu/drm/drm_atomic_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index d5ebe6ea0acb..166085a7e681 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2222,13 +2222,13 @@ int drm_atomic_helper_commit(struct drm_device *dev,
* current layout.
*
* NOTE: Commit work has multiple phases, first hardware commit, then
- * cleanup. We want them to overlap, hence need system_unbound_wq to
+ * cleanup. We want them to overlap, hence need system_dfl_wq to
* make sure work items don't artificially stall on each another.
*/
drm_atomic_state_get(state);
if (nonblock)
- queue_work(system_unbound_wq, &state->commit_work);
+ queue_work(system_dfl_wq, &state->commit_work);
else
commit_tail(state);
@@ -2261,7 +2261,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit);
*
* Asynchronous workers need to have sufficient parallelism to be able to run
* different atomic commits on different CRTCs in parallel. The simplest way to
- * achieve this is by running them on the &system_unbound_wq work queue. Note
+ * achieve this is by running them on the &system_dfl_wq work queue. Note
* that drivers are not required to split up atomic commits and run an
* individual commit in parallel - userspace is supposed to do that if it cares.
* But it might be beneficial to do that for modesets, since those necessarily
--
2.51.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 2/3] drm/probe-helper: replace use of system_wq with system_percpu_wq
2025-10-30 16:20 [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
2025-10-30 16:20 ` [PATCH 1/3] drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq Marco Crivellari
@ 2025-10-30 16:20 ` Marco Crivellari
2025-10-30 16:20 ` [PATCH 3/3] drm/self_refresh: " Marco Crivellari
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Marco Crivellari @ 2025-10-30 16:20 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Currently if a user enqueue 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_wq should be the per-cpu workqueue, yet in this name nothing makes
that clear, so replace system_wq with system_percpu_wq.
The old wq (system_wq) will be kept for a few release cycles.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
drivers/gpu/drm/drm_probe_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 09b12c30df69..d4dc8cb45bce 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -626,7 +626,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
*/
dev->mode_config.delayed_event = true;
if (dev->mode_config.poll_enabled)
- mod_delayed_work(system_wq,
+ mod_delayed_work(system_percpu_wq,
&dev->mode_config.output_poll_work,
0);
}
--
2.51.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 3/3] drm/self_refresh: replace use of system_wq with system_percpu_wq
2025-10-30 16:20 [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
2025-10-30 16:20 ` [PATCH 1/3] drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq Marco Crivellari
2025-10-30 16:20 ` [PATCH 2/3] drm/probe-helper: replace use of system_wq with system_percpu_wq Marco Crivellari
@ 2025-10-30 16:20 ` Marco Crivellari
2025-12-02 13:21 ` [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
2026-02-04 11:58 ` Thomas Zimmermann
4 siblings, 0 replies; 10+ messages in thread
From: Marco Crivellari @ 2025-10-30 16:20 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Currently if a user enqueue 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_wq should be the per-cpu workqueue, yet in this name nothing makes
that clear, so replace system_wq with system_percpu_wq.
The old wq (system_wq) will be kept for a few release cycles.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_self_refresh_helper.c b/drivers/gpu/drm/drm_self_refresh_helper.c
index c0948586b7fd..36f4237efd4d 100644
--- a/drivers/gpu/drm/drm_self_refresh_helper.c
+++ b/drivers/gpu/drm/drm_self_refresh_helper.c
@@ -218,7 +218,7 @@ void drm_self_refresh_helper_alter_state(struct drm_atomic_state *state)
ewma_psr_time_read(&sr_data->exit_avg_ms)) * 2;
mutex_unlock(&sr_data->avg_mutex);
- mod_delayed_work(system_wq, &sr_data->entry_work,
+ mod_delayed_work(system_percpu_wq, &sr_data->entry_work,
msecs_to_jiffies(delay));
}
}
--
2.51.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2025-10-30 16:20 [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
` (2 preceding siblings ...)
2025-10-30 16:20 ` [PATCH 3/3] drm/self_refresh: " Marco Crivellari
@ 2025-12-02 13:21 ` Marco Crivellari
2026-02-04 10:58 ` Marco Crivellari
2026-02-04 11:58 ` Thomas Zimmermann
4 siblings, 1 reply; 10+ messages in thread
From: Marco Crivellari @ 2025-12-02 13:21 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Hi,
On Thu, Oct 30, 2025 at 5:20 PM Marco Crivellari
<marco.crivellari@suse.com> wrote:
> Marco Crivellari (3):
> drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq
> drm/probe-helper: replace use of system_wq with system_percpu_wq
> drm/self_refresh: replace use of system_wq with system_percpu_wq
>
> drivers/gpu/drm/drm_atomic_helper.c | 6 +++---
> drivers/gpu/drm/drm_probe_helper.c | 2 +-
> drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
Gentle ping.
Thanks!
--
Marco Crivellari
L3 Support Engineer, Technology & Product
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2025-12-02 13:21 ` [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
@ 2026-02-04 10:58 ` Marco Crivellari
0 siblings, 0 replies; 10+ messages in thread
From: Marco Crivellari @ 2026-02-04 10:58 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
On Tue, Dec 2, 2025 at 2:21 PM Marco Crivellari
<marco.crivellari@suse.com> wrote:
> On Thu, Oct 30, 2025 at 5:20 PM Marco Crivellari
> <marco.crivellari@suse.com> wrote:
> > Marco Crivellari (3):
> > drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq
> > drm/probe-helper: replace use of system_wq with system_percpu_wq
> > drm/self_refresh: replace use of system_wq with system_percpu_wq
> >
> > drivers/gpu/drm/drm_atomic_helper.c | 6 +++---
> > drivers/gpu/drm/drm_probe_helper.c | 2 +-
> > drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
> > 3 files changed, 5 insertions(+), 5 deletions(-)
>
> Gentle ping.
Hi,
Gentle ping.
Thanks.
--
Marco Crivellari
L3 Support Engineer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2025-10-30 16:20 [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
` (3 preceding siblings ...)
2025-12-02 13:21 ` [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs Marco Crivellari
@ 2026-02-04 11:58 ` Thomas Zimmermann
2026-02-04 13:36 ` Marco Crivellari
4 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2026-02-04 11:58 UTC (permalink / raw)
To: Marco Crivellari, linux-kernel, dri-devel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter
Hi
Am 30.10.25 um 17:20 schrieb Marco Crivellari:
> Hi,
>
> === Current situation: problems ===
>
> Let's consider a nohz_full system with isolated CPUs: wq_unbound_cpumask is
> set to the housekeeping CPUs, for !WQ_UNBOUND the local CPU is selected.
>
> This leads to different scenarios if a work item is scheduled on an
> isolated CPU where "delay" value is 0 or greater then 0:
> schedule_delayed_work(, 0);
>
> This will be handled by __queue_work() that will queue the work item on the
> current local (isolated) CPU, while:
>
> schedule_delayed_work(, 1);
>
> Will move the timer on an housekeeping CPU, and schedule the work there.
>
> Currently if a user enqueue 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.
>
> === Recent changes to the WQ API ===
>
> The following, address the recent changes in the Workqueue API:
>
> - commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
> - commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")
>
> The old workqueues will be removed in a future release cycle.
>
> === Introduced Changes by this series ===
>
> 1) [P 1-2-3] Replace uses of system_wq and system_unbound_wq
>
> system_wq is a per-CPU workqueue, but his name is not clear.
> system_unbound_wq is to be used when locality is not required.
>
> Because of that, system_wq has been replaced with system_percpu_wq, and
> system_unbound_wq has been replaced with system_dfl_wq.
From the description, I've found it hard to see if there's a change in
semantics here. But this series is effectively about renaming AFAICT. If so,
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
for all patches.
Best regards
Thomas
>
> Thanks!
>
>
> Marco Crivellari (3):
> drm/atomic-helper: replace use of system_unbound_wq with system_dfl_wq
> drm/probe-helper: replace use of system_wq with system_percpu_wq
> drm/self_refresh: replace use of system_wq with system_percpu_wq
>
> drivers/gpu/drm/drm_atomic_helper.c | 6 +++---
> drivers/gpu/drm/drm_probe_helper.c | 2 +-
> drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2026-02-04 11:58 ` Thomas Zimmermann
@ 2026-02-04 13:36 ` Marco Crivellari
2026-02-05 7:22 ` Thomas Zimmermann
0 siblings, 1 reply; 10+ messages in thread
From: Marco Crivellari @ 2026-02-04 13:36 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: linux-kernel, dri-devel, Tejun Heo, Lai Jiangshan,
Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter
On Wed, Feb 4, 2026 at 12:58 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> [...]
> From the description, I've found it hard to see if there's a change in
> semantics here. But this series is effectively about renaming AFAICT. If so,
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> for all patches.
Hi Thomas,
The new version of the changelog is more clear then this one. In case you
want a cleaner version I can submit a new version.
Anyhow yes, in short the change is the introduction of system_percpu_wq
and system_dfl_wq without changing the behavior:
system_wq -> system_percpu_wq
system_unbound_wq -> system_dfl_wq
Many thanks!
--
Marco Crivellari
L3 Support Engineer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2026-02-04 13:36 ` Marco Crivellari
@ 2026-02-05 7:22 ` Thomas Zimmermann
2026-02-05 9:01 ` Marco Crivellari
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2026-02-05 7:22 UTC (permalink / raw)
To: Marco Crivellari
Cc: linux-kernel, dri-devel, Tejun Heo, Lai Jiangshan,
Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter
Hi
Am 04.02.26 um 14:36 schrieb Marco Crivellari:
> On Wed, Feb 4, 2026 at 12:58 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> [...]
>> From the description, I've found it hard to see if there's a change in
>> semantics here. But this series is effectively about renaming AFAICT. If so,
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>
>> for all patches.
> Hi Thomas,
>
> The new version of the changelog is more clear then this one. In case you
> want a cleaner version I can submit a new version.
No need for an update.
>
> Anyhow yes, in short the change is the introduction of system_percpu_wq
> and system_dfl_wq without changing the behavior:
>
> system_wq -> system_percpu_wq
> system_unbound_wq -> system_dfl_wq
>
>
> Many thanks!
These patches go through DRM trees, right? I can merge them if no other
reviews come in. Ping me if they get lost again.
Best regards
Thomas
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] replace system_unbound_wq and system_wq with the new wqs
2026-02-05 7:22 ` Thomas Zimmermann
@ 2026-02-05 9:01 ` Marco Crivellari
0 siblings, 0 replies; 10+ messages in thread
From: Marco Crivellari @ 2026-02-05 9:01 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: linux-kernel, dri-devel, Tejun Heo, Lai Jiangshan,
Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter
Hi,
On Thu, Feb 5, 2026 at 8:22 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>[...]
> These patches go through DRM trees, right? I can merge them if no other
> reviews come in. Ping me if they get lost again.
Yes, sure I will, thank you!
--
Marco Crivellari
L3 Support Engineer
^ permalink raw reply [flat|nested] 10+ messages in thread