Re: [PATCH v2] rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq

From: Gary Guo

Date: Wed Oct 14 2026 - 05:21:32 EST


On Wed Oct 14, 2026 at 10:08 AM BST, Alice Ryhl wrote:
> From: Danilo Krummrich <dakr@xxxxxxxxxx>
>
> system_wq is deprecated and triggers a runtime warning:
>
> [ 0.857414] workqueue: work func ...WorkItemPointerKy0_E3runB7_ enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead.
>
> Replace system() with system_percpu() and system_dfl(), to match the
> previous behavior of the deprecated system() and convert doc examples
> and tests to system_dfl().
>
> system_unbound_wq is deprecated in the same way, in favor of
> system_dfl_wq. Since system_unbound() has no users, just remove it as
> well.
>
> Fixes: 64d8eae3f895 ("workqueue: Add warnings and fallback if system_{unbound}_wq is used")
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> Reviewed-by: Boqun Feng <boqun@xxxxxxxxxx>
> Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> This patch was previously sent as part of other workqueue series [1][2].
> However it's a fix that is independent of those series, so it's sent on
> its own here.
>
> [1] https://lore.kernel.org/all/20260726223613.1242940-3-dakr@xxxxxxxxxx
> [2] https://lore.kernel.org/all/20260807165252.3849875-2-dakr@xxxxxxxxxx
> ---
> Changes in v2:
> - Also remove system_unbound(), which is deprecated in the same way
> and has no users. (Gary)
> - Collect Reviewed-by from Boqun and Dongliang.
> - Link to v1: https://lore.kernel.org/r/20261013-rust-workqueue-system-fix-v1-1-e9ec616e402b@xxxxxxxxxx
>
> Changes since [2]:
> - Rebase on v7.3-rc7 and also convert the new SpinLockIrq KUnit test,
> which calls workqueue::system() and otherwise fails to build.
> - Add Fixes: tag for the commit that made system_wq warn.
> - Collect Reviewed-by from Daniel.
> ---
> Documentation/rust/testing.rst | 2 +-
> Documentation/translations/zh_CN/rust/testing.rst | 2 +-
> drivers/android/binder/process.rs | 4 +-
> rust/kernel/sync/completion.rs | 2 +-
> rust/kernel/sync/lock/spinlock.rs | 2 +-
> rust/kernel/workqueue.rs | 52 ++++++++++++-----------
> 6 files changed, 33 insertions(+), 31 deletions(-)