Skip to content

block: replace wq users and add WQ_PERCPU to alloc_workqueue() users#184

Closed
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/999229=>linus-master
Closed

block: replace wq users and add WQ_PERCPU to alloc_workqueue() users#184
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/999229=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Sep 5, 2025

Pull request for series with
subject: block: replace wq users and add WQ_PERCPU to alloc_workqueue() users
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=999229

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 5, 2025

Upstream branch: c8bc81a
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 6, 2025

Upstream branch: d1d10ce
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 268844c to ce6ee34 Compare September 6, 2025 08:10
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 1d2502f to 7254eb7 Compare September 6, 2025 08:20
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 6, 2025

Upstream branch: d1d10ce
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from ce6ee34 to 32bced4 Compare September 6, 2025 08:24
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 7254eb7 to 7fb5c4d Compare September 7, 2025 01:17
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 7, 2025

Upstream branch: b236920
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 32bced4 to dd7141a Compare September 7, 2025 01:21
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 7fb5c4d to 8f78eb6 Compare September 8, 2025 01:36
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 8, 2025

Upstream branch: 76eeb9b
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from dd7141a to 37f1d61 Compare September 8, 2025 01:39
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 8f78eb6 to fc2da57 Compare September 8, 2025 23:56
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 9, 2025

Upstream branch: f777d11
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 37f1d61 to 6916f28 Compare September 9, 2025 00:01
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 11, 2025

Upstream branch: 7aac719
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 6916f28 to 1056794 Compare September 11, 2025 08:19
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 12, 2025

Upstream branch: 320475f
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 1056794 to cbc880b Compare September 12, 2025 01:43
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 13, 2025

Upstream branch: 22f2037
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from cbc880b to 7432ce5 Compare September 13, 2025 00:47
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 16, 2025

Upstream branch: 46a51f4
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 7432ce5 to 554e787 Compare September 16, 2025 02:25
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 17, 2025

Upstream branch: 5aca796
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 554e787 to 1269f62 Compare September 17, 2025 00:41
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 18, 2025

Upstream branch: 992d4e4
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 1269f62 to e1320fd Compare September 18, 2025 00:45
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 18, 2025

Upstream branch: 8b789f2
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from e1320fd to 3a28d36 Compare September 18, 2025 09:04
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 19, 2025

Upstream branch: 097a6c3
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 3a28d36 to e78da47 Compare September 19, 2025 00:14
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 22, 2025

Upstream branch: 07e27ad
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from e78da47 to 0ff0c0f Compare September 22, 2025 00:27
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 consistentcy 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.

queue_work() / queue_delayed_work() / mod_delayed_work() will now use the
new unbound wq: whether the user still use the old wq a warn will be
printed along with a wq redirect to the new one.

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>
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 consistentcy 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.

queue_work() / queue_delayed_work() / mod_delayed_work() will now use the
new unbound wq: whether the user still use the old wq a warn will be
printed along with a wq redirect to the new one.

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>
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 consistentcy cannot be addressed without refactoring the API.

alloc_workqueue() treats all queues as per-CPU by default, while unbound
workqueues must opt-in via WQ_UNBOUND.

This default is suboptimal: most workloads benefit from unbound queues,
allowing the scheduler to place worker threads where they’re needed and
reducing noise when CPUs are isolated.

This default is suboptimal: most workloads benefit from unbound queues,
allowing the scheduler to place worker threads where they’re needed and
reducing noise when CPUs are isolated.

This patch adds a new WQ_PERCPU flag to explicitly request the use of
the per-CPU behavior. Both flags coexist for one release cycle to allow
callers to transition their calls.

Once migration is complete, WQ_UNBOUND can be removed and unbound will
become the implicit default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU.

All existing users have been updated accordingly.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Sep 22, 2025

Upstream branch: 07e27ad
series: https://patchwork.kernel.org/project/linux-block/list/?series=999229
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/999229=>linus-master branch from 0ff0c0f to 181599c Compare September 22, 2025 00:45
@kawasaki kawasaki closed this Sep 22, 2025
@blktests-ci blktests-ci Bot deleted the series/999229=>linus-master branch September 24, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants