From: Frederic Weisbecker <frederic@kernel.org>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH v2 2/4] Workqueue: replace use of system_unbound_wq with system_dfl_wq
Date: Mon, 25 Aug 2025 15:49:34 +0200 [thread overview]
Message-ID: <aKxp7h8GWg8cGIla@localhost.localdomain> (raw)
In-Reply-To: <20250825132906.1050437-3-marco.crivellari@suse.com>
Le Mon, Aug 25, 2025 at 03:29:04PM +0200, Marco Crivellari a écrit :
> 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>
This should be one patch per subsystem. Here is how you can divide that
into a patchset:
> ---
> drivers/accel/ivpu/ivpu_pm.c | 2 +-
> drivers/acpi/scan.c | 2 +-
> drivers/base/dd.c | 2 +-
> drivers/block/zram/zram_drv.c | 2 +-
> drivers/char/random.c | 8 ++++----
> drivers/gpu/drm/amd/amdgpu/aldebaran.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 2 +-
> drivers/gpu/drm/drm_atomic_helper.c | 6 +++---
> drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
> drivers/gpu/drm/i915/display/intel_tc.c | 4 ++--
> drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +-
> drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 ++--
> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 ++--
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 +++---
> drivers/gpu/drm/i915/i915_active.c | 2 +-
> drivers/gpu/drm/i915/i915_sw_fence_work.c | 2 +-
> drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
> drivers/gpu/drm/i915/pxp/intel_pxp.c | 2 +-
> drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 2 +-
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +-
> drivers/gpu/drm/xe/xe_devcoredump.c | 2 +-
> drivers/gpu/drm/xe/xe_execlist.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++--
> drivers/gpu/drm/xe/xe_oa.c | 2 +-
> drivers/gpu/drm/xe/xe_vm.c | 4 ++--
> drivers/hte/hte.c | 2 +-
> drivers/infiniband/core/ucma.c | 2 +-
> drivers/infiniband/hw/mlx5/odp.c | 4 ++--
> drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 8 ++++----
> drivers/net/macvlan.c | 2 +-
> drivers/net/netdevsim/dev.c | 6 +++---
> drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 ++--
> drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 +-
> drivers/scsi/qla2xxx/qla_os.c | 2 +-
> drivers/scsi/scsi_transport_iscsi.c | 2 +-
> drivers/soc/xilinx/zynqmp_power.c | 6 +++---
> drivers/target/sbp/sbp_target.c | 8 ++++----
> drivers/tty/serial/8250/8250_dw.c | 4 ++--
> drivers/tty/tty_buffer.c | 8 ++++----
One patch for drivers.
> fs/afs/callback.c | 4 ++--
> fs/afs/write.c | 2 +-
> fs/bcachefs/btree_write_buffer.c | 2 +-
> fs/bcachefs/io_read.c | 12 ++++++------
> fs/bcachefs/journal_io.c | 2 +-
> fs/btrfs/block-group.c | 2 +-
> fs/btrfs/extent_map.c | 2 +-
> fs/btrfs/space-info.c | 4 ++--
> fs/btrfs/zoned.c | 2 +-
> fs/ext4/mballoc.c | 2 +-
> fs/netfs/objects.c | 2 +-
> fs/netfs/read_collect.c | 2 +-
> fs/netfs/write_collect.c | 2 +-
> fs/nfsd/filecache.c | 2 +-
> fs/notify/mark.c | 4 ++--
> fs/quota/dquot.c | 2 +-
One for fs.
> include/linux/workqueue.h | 4 ++--
One for workqueue.
> io_uring/io_uring.c | 2 +-
One for io_uring.
> kernel/bpf/helpers.c | 4 ++--
> kernel/bpf/memalloc.c | 2 +-
> kernel/bpf/syscall.c | 2 +-
One for bpf.
> kernel/padata.c | 4 ++--
One for padata.
> kernel/sched/core.c | 4 ++--
> kernel/sched/ext.c | 4 ++--
One for scheduler.
> kernel/umh.c | 2 +-
One for umh.
> kernel/workqueue.c | 2 +-
Should join the workqueue change above.
> mm/backing-dev.c | 2 +-
> mm/kfence/core.c | 6 +++---
> mm/memcontrol.c | 4 ++--
One for mm.
> net/core/link_watch.c | 4 ++--
> net/unix/garbage.c | 2 +-
> net/wireless/core.c | 4 ++--
> net/wireless/sysfs.c | 2 +-
One for net.
> rust/kernel/workqueue.rs | 6 +++---
This can join the workqueue changes above.
> sound/soc/codecs/wm_adsp.c | 2 +-
And finally one for sound.
Thanks!
--
Frederic Weisbecker
SUSE Labs
next prev parent reply other threads:[~2025-08-25 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 13:29 [PATCH v2 0/4] Workqueue: replace system wq and change alloc_workqueue callers Marco Crivellari
2025-08-25 13:29 ` [PATCH v2 1/4] Workqueue: replace use of system_wq with system_percpu_wq Marco Crivellari
2025-08-25 13:55 ` Frederic Weisbecker
2025-08-25 13:29 ` [PATCH v2 2/4] Workqueue: replace use of system_unbound_wq with system_dfl_wq Marco Crivellari
2025-08-25 13:49 ` Frederic Weisbecker [this message]
2025-08-25 13:29 ` [PATCH v2 3/4] Workqueue: WQ_PERCPU added to all the remaining users Marco Crivellari
2025-08-25 13:55 ` Frederic Weisbecker
2025-08-25 13:29 ` [PATCH v2 4/4] [Doc] Workqueue: WQ_UNBOUND doc upgraded Marco Crivellari
2025-08-25 13:57 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKxp7h8GWg8cGIla@localhost.localdomain \
--to=frederic@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox