[PATCH] driver core: Use system_percpu_wq instead of system_wq

Nathan Chancellor posted 1 patch 5 days, 23 hours ago
drivers/base/dd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] driver core: Use system_percpu_wq instead of system_wq
Posted by Nathan Chancellor 5 days, 23 hours ago
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@kernel.org>
---
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
Re: [PATCH] driver core: Use system_percpu_wq instead of system_wq
Posted by Danilo Krummrich 5 days, 13 hours ago
On Mon, 01 Jun 2026 20:56:31 -0700, Nathan Chancellor wrote:
> [PATCH] driver core: Use system_percpu_wq instead of system_wq

Applied, thanks!

  Branch: driver-core-testing
  Tree:   git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git

[1/1] driver core: Use system_percpu_wq instead of system_wq
      commit: fda8355f13ea

The patch will appear in the next linux-next integration (typically within 24
hours on weekdays).

The patch is in the driver-core-testing branch and will be promoted to
driver-core-next after validation.
Re: [PATCH] driver core: Use system_percpu_wq instead of system_wq
Posted by Danilo Krummrich 5 days, 13 hours ago
On Tue Jun 2, 2026 at 5:56 AM CEST, Nathan Chancellor wrote:
> 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,

Thanks for catching this!

I think this does not actually require per-CPU affinity, but that's independent
of this patch of course.

Thanks,
Danilo
Re: [PATCH] driver core: Use system_percpu_wq instead of system_wq
Posted by Rafael J. Wysocki 5 days, 19 hours ago
On Tue, Jun 2, 2026 at 5:56 AM Nathan Chancellor <nathan@kernel.org> 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@kernel.org>

Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>

> ---
> 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
>