]> git.ipfire.org Git - thirdparty/linux.git/commit
fs: replace use of system_unbound_wq with system_dfl_wq
authorMarco Crivellari <marco.crivellari@suse.com>
Tue, 16 Sep 2025 08:29:04 +0000 (10:29 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 14:15:07 +0000 (16:15 +0200)
commit7a4f92d39f66f890cbb157dd4d7daf6a9298324a
tree70b2617533d7f8f20eecaaeb8661e48470f34156
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
fs: replace use of system_unbound_wq with system_dfl_wq

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.

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>
Link: https://lore.kernel.org/20250916082906.77439-2-marco.crivellari@suse.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
16 files changed:
fs/afs/callback.c
fs/afs/write.c
fs/bcachefs/btree_write_buffer.c
fs/bcachefs/io_read.c
fs/bcachefs/journal_io.c
fs/btrfs/block-group.c
fs/btrfs/extent_map.c
fs/btrfs/space-info.c
fs/btrfs/zoned.c
fs/coredump.c
fs/ext4/mballoc.c
fs/netfs/misc.c
fs/netfs/objects.c
fs/nfsd/filecache.c
fs/notify/mark.c
fs/quota/dquot.c