Re: [PATCH] driver core: Use system_percpu_wq instead of system_wq
From: Rafael J. Wysocki
Date: Tue Jun 02 2026 - 04:10:10 EST
On Tue, Jun 2, 2026 at 5:56 AM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
>
> Commit 1137838865bf ("driver core: Use mod_delayed_work to prevent lost
> deferred probe work") added a use of system_wq, which is deprecated in
> favor of system_percpu_wq added by commit 128ea9f6ccfb ("workqueue: Add
> system_percpu_wq and system_dfl_wq"). An upcoming warning in the
> workqueue tree flags this with:
>
> workqueue: work func deferred_probe_timeout_work_func enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead.
>
> Switch to system_percpu_wq to clear up the warning.
>
> Fixes: 1137838865bf ("driver core: Use mod_delayed_work to prevent lost deferred probe work")
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
> ---
> This should go via the driver-core tree since the Fixes commit is only
> in that tree currently. The warning is only visible in -next when the
> driver-core tree and workqueue tree are merged together.
> ---
> drivers/base/dd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index a8ca2092905e..60c005223844 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -324,7 +324,7 @@ void deferred_probe_extend_timeout(void)
> * start a new one.
> */
> if (delayed_work_pending(&deferred_probe_timeout_work) &&
> - mod_delayed_work(system_wq, &deferred_probe_timeout_work,
> + mod_delayed_work(system_percpu_wq, &deferred_probe_timeout_work,
> secs_to_jiffies(driver_deferred_probe_timeout)))
> pr_debug("Extended deferred probe timeout by %d secs\n",
> driver_deferred_probe_timeout);
>
> ---
> base-commit: 46def663dd34da36464ba059f7cfeacf29d98e5e
> change-id: 20260601-driver-core-fix-system_wq-warning-0c5db4f49c62
>
> Best regards,
> --
> Cheers,
> Nathan
>