diff options
| author | Marco Crivellari <marco.crivellari@suse.com> | 2025-09-16 10:29:05 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 16:15:07 +0200 |
| commit | 4ef64db060619be040351e3960e151e5fef3f895 (patch) | |
| tree | 034d3698cec60ac633b5d06f16260caf14605e22 /fs/fuse | |
| parent | 7a4f92d39f66f890cbb157dd4d7daf6a9298324a (diff) | |
| download | linux-4ef64db060619be040351e3960e151e5fef3f895.tar.gz linux-4ef64db060619be040351e3960e151e5fef3f895.tar.bz2 linux-4ef64db060619be040351e3960e151e5fef3f895.zip | |
fs: replace use of system_wq with system_percpu_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_wq is a per-CPU worqueue, yet nothing in its name tells about that
CPU affinity constraint, which is very often not required by users.
Make it clear by adding a system_percpu_wq to all the fs subsystem.
The old wq will be kept for a few release cylces.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://lore.kernel.org/20250916082906.77439-3-marco.crivellari@suse.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/fuse')
| -rw-r--r-- | fs/fuse/dev.c | 2 | ||||
| -rw-r--r-- | fs/fuse/inode.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index e80cd8f2c049..8520eb94c527 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -119,7 +119,7 @@ void fuse_check_timeout(struct work_struct *work) goto abort_conn; out: - queue_delayed_work(system_wq, &fc->timeout.work, + queue_delayed_work(system_percpu_wq, &fc->timeout.work, fuse_timeout_timer_freq); return; diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index ecb869e895ab..b12cd19a9bca 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1273,7 +1273,7 @@ static void set_request_timeout(struct fuse_conn *fc, unsigned int timeout) { fc->timeout.req_timeout = secs_to_jiffies(timeout); INIT_DELAYED_WORK(&fc->timeout.work, fuse_check_timeout); - queue_delayed_work(system_wq, &fc->timeout.work, + queue_delayed_work(system_percpu_wq, &fc->timeout.work, fuse_timeout_timer_freq); } |
