* [RFC PATCH 3/6] hfsplus: Move long delayed work on system_dfl_long_wq
[not found] <20260508134541.282073-1-marco.crivellari@suse.com>
@ 2026-05-08 13:45 ` Marco Crivellari
2026-05-08 18:34 ` Viacheslav Dubeyko
2026-05-08 13:45 ` [RFC PATCH 4/6] hfs: " Marco Crivellari
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Marco Crivellari @ 2026-05-08 13:45 UTC (permalink / raw)
To: linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Viacheslav Dubeyko, John Paul Adrian Glaubitz, Yangtao Li,
linux-fsdevel
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.
The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.
Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.
Recently, a new unbound workqueue specific for long running work has
been added:
c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Yangtao Li <frank.li@vivo.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
fs/hfsplus/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 40a0feda716b..12ba672e13bc 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -314,7 +314,7 @@ void hfsplus_mark_mdb_dirty(struct super_block *sb)
spin_lock(&sbi->work_lock);
if (!sbi->work_queued) {
delay = msecs_to_jiffies(dirty_writeback_interval * 10);
- queue_delayed_work(system_long_wq, &sbi->sync_work, delay);
+ queue_delayed_work(system_dfl_long_wq, &sbi->sync_work, delay);
sbi->work_queued = 1;
}
spin_unlock(&sbi->work_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [RFC PATCH 3/6] hfsplus: Move long delayed work on system_dfl_long_wq
2026-05-08 13:45 ` [RFC PATCH 3/6] hfsplus: Move long delayed work on system_dfl_long_wq Marco Crivellari
@ 2026-05-08 18:34 ` Viacheslav Dubeyko
0 siblings, 0 replies; 6+ messages in thread
From: Viacheslav Dubeyko @ 2026-05-08 18:34 UTC (permalink / raw)
To: Marco Crivellari, linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Viacheslav Dubeyko,
John Paul Adrian Glaubitz, Yangtao Li, linux-fsdevel
On Fri, 2026-05-08 at 15:45 +0200, Marco Crivellari wrote:
> Currently the code enqueue work items using {queue|mod}_delayed_work(),
> using system_long_wq. This workqueue should be used when long works are
> expected and it is a per-cpu workqueue.
>
> The function(s) end up calling __queue_delayed_work(), which set a global
> timer that could fire anywhere, enqueuing the work where the timer fired.
>
> Unbound works could benefit from scheduler task placement, to optimize
> performance and power consumption. Long work shouldn't stick to a single
> CPU.
>
> Recently, a new unbound workqueue specific for long running work has
> been added:
>
> c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
>
> Since the workqueue work doesn't rely on per-cpu variables, there is no
> obvious reason that justify the use of a per-cpu workqueue. So change
> system_long_wq with system_dfl_long_wq so that the work may benefit from
> scheduler task placement.
>
> Cc: Viacheslav Dubeyko <slava@dubeyko.com>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: Yangtao Li <frank.li@vivo.com>
> Cc: linux-fsdevel@vger.kernel.org
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
> ---
> fs/hfsplus/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
> index 40a0feda716b..12ba672e13bc 100644
> --- a/fs/hfsplus/super.c
> +++ b/fs/hfsplus/super.c
> @@ -314,7 +314,7 @@ void hfsplus_mark_mdb_dirty(struct super_block *sb)
> spin_lock(&sbi->work_lock);
> if (!sbi->work_queued) {
> delay = msecs_to_jiffies(dirty_writeback_interval * 10);
> - queue_delayed_work(system_long_wq, &sbi->sync_work, delay);
> + queue_delayed_work(system_dfl_long_wq, &sbi->sync_work, delay);
> sbi->work_queued = 1;
> }
> spin_unlock(&sbi->work_lock);
Looks good.
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Thanks,
Slava.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH 4/6] hfs: Move long delayed work on system_dfl_long_wq
[not found] <20260508134541.282073-1-marco.crivellari@suse.com>
2026-05-08 13:45 ` [RFC PATCH 3/6] hfsplus: Move long delayed work on system_dfl_long_wq Marco Crivellari
@ 2026-05-08 13:45 ` Marco Crivellari
2026-05-08 18:34 ` Viacheslav Dubeyko
2026-05-08 13:45 ` [RFC PATCH 5/6] fuse: dax: " Marco Crivellari
2026-05-08 13:45 ` [RFC PATCH 6/6] affs: " Marco Crivellari
3 siblings, 1 reply; 6+ messages in thread
From: Marco Crivellari @ 2026-05-08 13:45 UTC (permalink / raw)
To: linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Viacheslav Dubeyko, Yangtao Li, linux-fsdevel
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.
The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.
Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.
Recently, a new unbound workqueue specific for long running work has
been added:
c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: John Paul Adrian Glaubitz
Cc: Yangtao Li <frank.li@vivo.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
fs/hfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index a4f2a2bfa6d3..cf4e7a6112e7 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -82,7 +82,7 @@ void hfs_mark_mdb_dirty(struct super_block *sb)
spin_lock(&sbi->work_lock);
if (!sbi->work_queued) {
delay = msecs_to_jiffies(dirty_writeback_interval * 10);
- queue_delayed_work(system_long_wq, &sbi->mdb_work, delay);
+ queue_delayed_work(system_dfl_long_wq, &sbi->mdb_work, delay);
sbi->work_queued = 1;
}
spin_unlock(&sbi->work_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [RFC PATCH 4/6] hfs: Move long delayed work on system_dfl_long_wq
2026-05-08 13:45 ` [RFC PATCH 4/6] hfs: " Marco Crivellari
@ 2026-05-08 18:34 ` Viacheslav Dubeyko
0 siblings, 0 replies; 6+ messages in thread
From: Viacheslav Dubeyko @ 2026-05-08 18:34 UTC (permalink / raw)
To: Marco Crivellari, linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Michal Hocko, Viacheslav Dubeyko,
Yangtao Li, linux-fsdevel
On Fri, 2026-05-08 at 15:45 +0200, Marco Crivellari wrote:
> Currently the code enqueue work items using {queue|mod}_delayed_work(),
> using system_long_wq. This workqueue should be used when long works are
> expected and it is a per-cpu workqueue.
>
> The function(s) end up calling __queue_delayed_work(), which set a global
> timer that could fire anywhere, enqueuing the work where the timer fired.
>
> Unbound works could benefit from scheduler task placement, to optimize
> performance and power consumption. Long work shouldn't stick to a single
> CPU.
>
> Recently, a new unbound workqueue specific for long running work has
> been added:
>
> c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
>
> Since the workqueue work doesn't rely on per-cpu variables, there is no
> obvious reason that justify the use of a per-cpu workqueue. So change
> system_long_wq with system_dfl_long_wq so that the work may benefit from
> scheduler task placement.
>
> Cc: Viacheslav Dubeyko <slava@dubeyko.com>
> Cc: John Paul Adrian Glaubitz
> Cc: Yangtao Li <frank.li@vivo.com>
> Cc: linux-fsdevel@vger.kernel.org
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
> ---
> fs/hfs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/hfs/super.c b/fs/hfs/super.c
> index a4f2a2bfa6d3..cf4e7a6112e7 100644
> --- a/fs/hfs/super.c
> +++ b/fs/hfs/super.c
> @@ -82,7 +82,7 @@ void hfs_mark_mdb_dirty(struct super_block *sb)
> spin_lock(&sbi->work_lock);
> if (!sbi->work_queued) {
> delay = msecs_to_jiffies(dirty_writeback_interval * 10);
> - queue_delayed_work(system_long_wq, &sbi->mdb_work, delay);
> + queue_delayed_work(system_dfl_long_wq, &sbi->mdb_work, delay);
> sbi->work_queued = 1;
> }
> spin_unlock(&sbi->work_lock);
Looks good.
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Thanks,
Slava.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH 5/6] fuse: dax: Move long delayed work on system_dfl_long_wq
[not found] <20260508134541.282073-1-marco.crivellari@suse.com>
2026-05-08 13:45 ` [RFC PATCH 3/6] hfsplus: Move long delayed work on system_dfl_long_wq Marco Crivellari
2026-05-08 13:45 ` [RFC PATCH 4/6] hfs: " Marco Crivellari
@ 2026-05-08 13:45 ` Marco Crivellari
2026-05-08 13:45 ` [RFC PATCH 6/6] affs: " Marco Crivellari
3 siblings, 0 replies; 6+ messages in thread
From: Marco Crivellari @ 2026-05-08 13:45 UTC (permalink / raw)
To: linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
Miklos Szeredi, linux-fsdevel
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.
The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.
Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.
Recently, a new unbound workqueue specific for long running work has
been added:
c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
fs/fuse/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index f6cf00a8938c..8b53625ac7ab 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -113,7 +113,7 @@ __kick_dmap_free_worker(struct fuse_conn_dax *fcd, unsigned long delay_ms)
free_threshold = max_t(unsigned long, fcd->nr_ranges * FUSE_DAX_RECLAIM_THRESHOLD / 100,
1);
if (fcd->nr_free_ranges < free_threshold)
- queue_delayed_work(system_long_wq, &fcd->free_work,
+ queue_delayed_work(system_dfl_long_wq, &fcd->free_work,
msecs_to_jiffies(delay_ms));
}
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH 6/6] affs: Move long delayed work on system_dfl_long_wq
[not found] <20260508134541.282073-1-marco.crivellari@suse.com>
` (2 preceding siblings ...)
2026-05-08 13:45 ` [RFC PATCH 5/6] fuse: dax: " Marco Crivellari
@ 2026-05-08 13:45 ` Marco Crivellari
3 siblings, 0 replies; 6+ messages in thread
From: Marco Crivellari @ 2026-05-08 13:45 UTC (permalink / raw)
To: linux-kernel
Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
David Sterba, linux-fsdevel
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.
The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.
Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.
Recently, a new unbound workqueue specific for long running work has
been added:
c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.
Cc: David Sterba <dsterba@suse.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
fs/affs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 079f36e1ddec..061da7b795bd 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -88,7 +88,7 @@ void affs_mark_sb_dirty(struct super_block *sb)
spin_lock(&sbi->work_lock);
if (!sbi->work_queued) {
delay = msecs_to_jiffies(dirty_writeback_interval * 10);
- queue_delayed_work(system_long_wq, &sbi->sb_work, delay);
+ queue_delayed_work(system_dfl_long_wq, &sbi->sb_work, delay);
sbi->work_queued = 1;
}
spin_unlock(&sbi->work_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread