Re: [PATCH] rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq
From: Gary Guo
Date: Tue Oct 13 2026 - 13:29:05 EST
On Tue Oct 13, 2026 at 2:51 PM 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() is also deprecated (replaced by system_dfl(). It appears to
have no users, so we should remove it in the same patch.
Best,
Gary
>
> 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>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> ---
> 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 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 | 42 +++++++++++++++--------
> 6 files changed, 33 insertions(+), 21 deletions(-)