]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: endpoint: Replace use of system_wq with system_percpu_wq
authorMarco Crivellari <marco.crivellari@suse.com>
Wed, 5 Nov 2025 15:16:49 +0000 (16:16 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 29 Dec 2025 16:33:22 +0000 (10:33 -0600)
Currently work items enqueued by schedule_delayed_work() use "system_wq" (a
per-CPU wq) while queue_delayed_work() uses 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 consistency cannot be addressed without refactoring the API.

This continues the effort to refactor workqueue APIs, which began with the
introduction of new workqueues and a new alloc_workqueue() flag in:

  128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
  930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

Replace system_wq with system_percpu_wq, keeping the same behavior.  The
old wq (system_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>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251105151649.256274-1-marco.crivellari@suse.com
drivers/pci/endpoint/pci-ep-cfs.c

index ef50c82e647f4d2fbab60d68cbb3b1d2e9ad9367..c787ce59d9ded298c0c039e7e3270d8abcc49e5a 100644 (file)
@@ -638,7 +638,7 @@ static struct config_group *pci_epf_make(struct config_group *group,
        kfree(epf_name);
 
        INIT_DELAYED_WORK(&epf_group->cfs_work, pci_epf_cfs_work);
-       queue_delayed_work(system_wq, &epf_group->cfs_work,
+       queue_delayed_work(system_percpu_wq, &epf_group->cfs_work,
                           msecs_to_jiffies(1));
 
        return &epf_group->group;