block: replace wq users and add WQ_PERCPU to alloc_workqueue() users#184
block: replace wq users and add WQ_PERCPU to alloc_workqueue() users#184blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
Conversation
|
Upstream branch: c8bc81a |
45f2b7a to
1d2502f
Compare
|
Upstream branch: d1d10ce |
268844c to
ce6ee34
Compare
1d2502f to
7254eb7
Compare
|
Upstream branch: d1d10ce |
ce6ee34 to
32bced4
Compare
7254eb7 to
7fb5c4d
Compare
|
Upstream branch: b236920 |
32bced4 to
dd7141a
Compare
7fb5c4d to
8f78eb6
Compare
|
Upstream branch: 76eeb9b |
dd7141a to
37f1d61
Compare
8f78eb6 to
fc2da57
Compare
|
Upstream branch: f777d11 |
37f1d61 to
6916f28
Compare
fc2da57 to
79c38cd
Compare
|
Upstream branch: 7aac719 |
6916f28 to
1056794
Compare
79c38cd to
a17e495
Compare
|
Upstream branch: 320475f |
1056794 to
cbc880b
Compare
a17e495 to
4366bd4
Compare
|
Upstream branch: 22f2037 |
cbc880b to
7432ce5
Compare
4366bd4 to
c5248c1
Compare
|
Upstream branch: 46a51f4 |
7432ce5 to
554e787
Compare
c5248c1 to
13a6f93
Compare
|
Upstream branch: 5aca796 |
554e787 to
1269f62
Compare
13a6f93 to
ba17659
Compare
|
Upstream branch: 992d4e4 |
1269f62 to
e1320fd
Compare
ba17659 to
3f46741
Compare
|
Upstream branch: 8b789f2 |
e1320fd to
3a28d36
Compare
3f46741 to
1c2ea74
Compare
|
Upstream branch: 097a6c3 |
3a28d36 to
e78da47
Compare
1c2ea74 to
2208c28
Compare
|
Upstream branch: 07e27ad |
e78da47 to
0ff0c0f
Compare
2208c28 to
73f860f
Compare
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>
|
Upstream branch: 07e27ad |
0ff0c0f to
181599c
Compare
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