drivers: replace wq users and add WQ_PERCPU to alloc_workqueue() users
Subsystems (120)
cover drivers: replace wq users and add WQ_PERCPU to alloc_workqueue() users
Hi!
Below is a summary of a discussion about the Workqueue API and cpu isolation considerations. Details and more information are available here:
"workqueue: Always use wq_select_unbound_cpu() for WORK_CPU_UNBOUND."
https://lore.kernel.org/all/[email protected]/
=== Current situation: problems ===
Let's consider a nohz_full system with isolated CPUs: wq_unbound_cpumask is set to the housekeeping CPUs, for !WQ_UNBOUND the local CPU is selected.
This leads to different scenarios if a work item is scheduled on an isolated CPU where "delay" value is 0 or greater then 0:
schedule_delayed_work(, 0);
This will be handled by __queue_work() that will queue the work item on the current local (isolated) CPU, while:
schedule_delayed_work(, 1);
Will move the timer on an housekeeping CPU, and schedule the work there.
Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use 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 consistentcy cannot be addressed without refactoring the API.
=== Plan and future plans ===
This patchset is the first stone on a refactoring needed in order to address the points aforementioned; it will have a positive impact also on the cpu isolation, in the long term, moving away percpu workqueue in favor to an unbound model.
These are the main steps:
1) API refactoring (that this patch is introducing)
- Make more clear and uniform the system wq names, both per-cpu and
unbound. This to avoid any possible confusion on what should be used.
- Introduction of WQ_PERCPU: this flag is the complement of WQ_UNBOUND,
introduced in this patchset and used on all the callers that are not currently using WQ_UNBOUND.
WQ_UNBOUND will be removed in a future release cycle.
Most users don't need to be per-cpu, because they don't have locality requirements, because of that, a next future step will be make "unbound" the default behavior.
2) Check who really needs to be per-cpu
- Remove the WQ_PERCPU flag when is not strictly required.
3) Add a new API (prefer local cpu)
- There are users that don't require a local execution, like mentioned
above; despite that, local execution yeld to performance gain.
This new API will prefer the local execution, without requiring it.
=== Introduced Changes by this series ===
1) [P 1-2] Replace use of system_wq and system_unbound_wq
system_wq is a per-CPU workqueue, but his name is not clear. system_unbound_wq is to be used when locality is not required.
Because of that, system_wq has been renamed in system_percpu_wq, and system_unbound_wq has been renamed in system_dfl_wq.
2) [P 3] add WQ_PERCPU to remaining alloc_workqueue() users
Every alloc_workqueue() caller should use one among WQ_PERCPU or WQ_UNBOUND. This is actually enforced warning if both or none of them are present at the same time.
WQ_UNBOUND will be removed in a next release cycle.
=== For Maintainers ===
There are prerequisites for this series, already merged in the master branch. The commits are:
128ea9f6ccfb6960293ae4212f4f97165e42222d ("workqueue: Add system_percpu_wq and system_dfl_wq")
930c2ea566aff59e962c50b2421d5fcc3b98b8be ("workqueue: Add new WQ_PERCPU flag")
Thanks!
Marco Crivellari (3):
drivers: replace use of system_unbound_wq with system_dfl_wq
drivers: replace use of system_wq with system_percpu_wq
drivers: WQ_PERCPU added to alloc_workqueue users
drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_ipc.c | 2 +- drivers/accel/ivpu/ivpu_job.c | 2 +- drivers/accel/ivpu/ivpu_mmu.c | 2 +- drivers/accel/ivpu/ivpu_pm.c | 4 +-- drivers/acpi/ec.c | 3 +- drivers/acpi/osl.c | 6 ++-- drivers/acpi/scan.c | 2 +- drivers/acpi/thermal.c | 3 +- drivers/ata/libata-sff.c | 3 +- drivers/base/core.c | 2 +- drivers/base/dd.c | 2 +- drivers/base/devcoredump.c | 2 +- drivers/bus/mhi/ep/main.c | 2 +- drivers/char/random.c | 8 ++--- drivers/char/tpm/tpm-dev-common.c | 3 +- drivers/char/xillybus/xillybus_core.c | 2 +- drivers/char/xillybus/xillyusb.c | 4 +-- drivers/cpufreq/tegra194-cpufreq.c | 3 +- drivers/crypto/atmel-i2c.c | 2 +- drivers/crypto/cavium/nitrox/nitrox_mbx.c | 2 +- drivers/crypto/intel/qat/qat_common/adf_aer.c | 4 +-- drivers/crypto/intel/qat/qat_common/adf_isr.c | 3 +- .../crypto/intel/qat/qat_common/adf_sriov.c | 3 +- .../crypto/intel/qat/qat_common/adf_vf_isr.c | 3 +- drivers/cxl/pci.c | 2 +- drivers/extcon/extcon-intel-int3496.c | 4 +-- drivers/firewire/core-transaction.c | 3 +- drivers/firewire/ohci.c | 3 +- drivers/gpio/gpiolib-cdev.c | 4 +-- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 3 +- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- drivers/gpu/drm/bridge/ti-tfp410.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 6 ++-- drivers/gpu/drm/drm_probe_helper.c | 2 +- drivers/gpu/drm/drm_self_refresh_helper.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- .../drm/i915/display/intel_display_driver.c | 3 +- .../drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 4 +-- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 +-- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 +-- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 ++-- drivers/gpu/drm/i915/i915_active.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 5 ++-- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_sw_fence_work.c | 2 +- drivers/gpu/drm/i915/i915_vma_resource.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 2 +- .../gpu/drm/i915/selftests/i915_sw_fence.c | 2 +- .../gpu/drm/i915/selftests/mock_gem_device.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_sched.c | 3 +- drivers/gpu/drm/radeon/radeon_display.c | 3 +- .../gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 4 +-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +-- drivers/gpu/drm/xe/xe_devcoredump.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 4 +-- drivers/gpu/drm/xe/xe_execlist.c | 2 +- drivers/gpu/drm/xe/xe_ggtt.c | 2 +- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 6 ++-- drivers/gpu/drm/xe/xe_guc_ct.c | 4 +-- drivers/gpu/drm/xe/xe_hw_engine_group.c | 3 +- drivers/gpu/drm/xe/xe_oa.c | 2 +- drivers/gpu/drm/xe/xe_pt.c | 2 +- drivers/gpu/drm/xe/xe_sriov.c | 2 +- drivers/gpu/drm/xe/xe_vm.c | 4 +-- drivers/greybus/operation.c | 2 +- drivers/hid/hid-nintendo.c | 3 +- drivers/hte/hte.c | 2 +- drivers/hv/mshv_eventfd.c | 2 +- drivers/i3c/master.c | 2 +- drivers/iio/adc/pac1934.c | 2 +- drivers/infiniband/core/cm.c | 2 +- drivers/infiniband/core/device.c | 4 +-- drivers/infiniband/core/ucma.c | 2 +- drivers/infiniband/hw/hfi1/init.c | 3 +- drivers/infiniband/hw/hfi1/opfn.c | 3 +- drivers/infiniband/hw/mlx4/cm.c | 2 +- drivers/infiniband/hw/mlx5/odp.c | 4 +-- drivers/infiniband/sw/rdmavt/cq.c | 3 +- drivers/infiniband/ulp/iser/iscsi_iser.c | 2 +- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- drivers/input/keyboard/gpio_keys.c | 2 +- drivers/input/misc/palmas-pwrbutton.c | 2 +- drivers/input/mouse/psmouse-smbus.c | 2 +- drivers/input/mouse/synaptics_i2c.c | 8 ++--- drivers/isdn/capi/kcapi.c | 2 +- drivers/leds/trigger/ledtrig-input-events.c | 2 +- drivers/md/bcache/btree.c | 3 +- drivers/md/bcache/super.c | 30 ++++++++++--------- drivers/md/bcache/writeback.c | 2 +- drivers/md/dm-bufio.c | 3 +- drivers/md/dm-cache-target.c | 3 +- drivers/md/dm-clone-target.c | 3 +- drivers/md/dm-crypt.c | 6 ++-- drivers/md/dm-delay.c | 4 ++- drivers/md/dm-integrity.c | 15 ++++++---- drivers/md/dm-kcopyd.c | 3 +- drivers/md/dm-log-userspace-base.c | 3 +- drivers/md/dm-mpath.c | 5 ++-- drivers/md/dm-raid1.c | 5 ++-- drivers/md/dm-snap-persistent.c | 3 +- drivers/md/dm-stripe.c | 2 +- drivers/md/dm-verity-target.c | 4 ++- drivers/md/dm-writecache.c | 3 +- drivers/md/dm.c | 3 +- drivers/md/md.c | 4 +-- drivers/media/pci/ddbridge/ddbridge-core.c | 2 +- .../platform/mediatek/mdp3/mtk-mdp3-core.c | 6 ++-- .../platform/synopsys/hdmirx/snps_hdmirx.c | 8 ++--- drivers/message/fusion/mptbase.c | 7 +++-- drivers/mmc/core/block.c | 3 +- drivers/mmc/host/mtk-sd.c | 4 +-- drivers/mmc/host/omap.c | 2 +- drivers/nvdimm/security.c | 4 +-- drivers/nvme/host/tcp.c | 2 ++ drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/core.c | 5 ++-- drivers/nvme/target/fabrics-cmd-auth.c | 2 +- drivers/nvme/target/fc.c | 6 ++-- drivers/nvme/target/tcp.c | 2 +- drivers/pci/endpoint/functions/pci-epf-mhi.c | 2 +- drivers/pci/endpoint/functions/pci-epf-ntb.c | 5 ++-- drivers/pci/endpoint/functions/pci-epf-test.c | 3 +- drivers/pci/endpoint/functions/pci-epf-vntb.c | 5 ++-- drivers/pci/endpoint/pci-ep-cfs.c | 2 +- drivers/pci/hotplug/pnv_php.c | 3 +- drivers/pci/hotplug/shpchp_core.c | 3 +- drivers/phy/allwinner/phy-sun4i-usb.c | 14 ++++----- .../platform/cznic/turris-omnia-mcu-gpio.c | 2 +- .../surface/aggregator/ssh_packet_layer.c | 2 +- .../surface/aggregator/ssh_request_layer.c | 2 +- .../platform/surface/surface_acpi_notify.c | 2 +- drivers/platform/x86/gpd-pocket-fan.c | 4 +-- .../x86/x86-android-tablets/vexia_atla10_ec.c | 2 +- drivers/rapidio/rio.c | 2 +- drivers/ras/cec.c | 2 +- drivers/regulator/irq_helpers.c | 2 +- drivers/regulator/qcom-labibb-regulator.c | 4 +-- drivers/scsi/be2iscsi/be_main.c | 3 +- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/qedf/qedf_main.c | 15 ++++++---- drivers/scsi/qedi/qedi_main.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 4 +-- drivers/scsi/qla2xxx/qla_target.c | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 3 +- drivers/scsi/scsi_transport_fc.c | 7 +++-- drivers/scsi/scsi_transport_iscsi.c | 2 +- drivers/soc/fsl/qbman/qman.c | 2 +- drivers/soc/xilinx/zynqmp_power.c | 6 ++-- drivers/staging/greybus/sdio.c | 2 +- drivers/target/sbp/sbp_target.c | 8 ++--- drivers/target/target_core_transport.c | 4 +-- drivers/target/target_core_xcopy.c | 2 +- drivers/target/tcm_fc/tfc_conf.c | 2 +- drivers/thunderbolt/tb.c | 2 +- drivers/tty/serial/8250/8250_dw.c | 4 +-- drivers/tty/tty_buffer.c | 8 ++--- drivers/usb/core/hub.c | 2 +- drivers/usb/dwc3/gadget.c | 2 +- drivers/usb/gadget/function/f_hid.c | 3 +- drivers/usb/host/xhci-dbgcap.c | 8 ++--- drivers/usb/host/xhci-ring.c | 2 +- drivers/usb/storage/uas.c | 2 +- drivers/usb/typec/anx7411.c | 3 +- drivers/vdpa/vdpa_user/vduse_dev.c | 3 +- drivers/virtio/virtio_balloon.c | 3 +- drivers/xen/events/events_base.c | 6 ++-- drivers/xen/privcmd.c | 3 +- 188 files changed, 351 insertions(+), 286 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/3 drivers: replace use of system_unbound_wq with system_dfl_wq
Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use 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 consistentcy cannot be addressed without refactoring the API.
system_unbound_wq should be the default workqueue so as not to enforce locality constraints for random work whenever it's not required.
Adding system_dfl_wq to encourage its use when unbound work should be used.
queue_work() / queue_delayed_work() / mod_delayed_work() will now use the new unbound wq: whether the user still use the old wq a warn will be printed along with a wq redirect to the new one.
The old system_unbound_wq will be kept for a few release cycles.
--- drivers/accel/ivpu/ivpu_pm.c | 2 +- drivers/acpi/scan.c | 2 +- drivers/base/dd.c | 2 +- drivers/char/random.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 6 +++--- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 ++-- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 ++-- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 +++--- drivers/gpu/drm/i915/i915_active.c | 2 +- drivers/gpu/drm/i915/i915_sw_fence_work.c | 2 +- drivers/gpu/drm/i915/i915_vma_resource.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/xe/xe_devcoredump.c | 2 +- drivers/gpu/drm/xe/xe_execlist.c | 2 +- drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++-- drivers/gpu/drm/xe/xe_oa.c | 2 +- drivers/gpu/drm/xe/xe_vm.c | 4 ++-- drivers/hte/hte.c | 2 +- drivers/infiniband/core/ucma.c | 2 +- drivers/infiniband/hw/mlx5/odp.c | 4 ++-- drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 8 ++++---- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/scsi_transport_iscsi.c | 2 +- drivers/soc/xilinx/zynqmp_power.c | 6 +++--- drivers/target/sbp/sbp_target.c | 8 ++++---- drivers/tty/serial/8250/8250_dw.c | 4 ++-- drivers/tty/tty_buffer.c | 8 ++++---- 36 files changed, 61 insertions(+), 61 deletions(-)
drivers/accel/ivpu/ivpu_pm.c +1 -1
@@ -181,7 +181,7 @@ void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)if (atomic_cmpxchg (&vdev->pm->reset_pending,0 ,1 ) ==0 ) {ivpu_hw_diagnose_failure (vdev);ivpu_hw_irq_disable (vdev);/* Disable IRQ early to protect from IRQ storm */ -queue_work (system_unbound_wq, &vdev->pm->recovery_work); +queue_work (system_dfl_wq, &vdev->pm->recovery_work); } }
drivers/acpi/scan.c +1 -1
@@ -2389,7 +2389,7 @@ static bool acpi_scan_clear_dep_queue(struct acpi_device *adev)* initial enumeration of devices is complete, put it into the unbound * workqueue. */ -queue_work (system_unbound_wq, &cdw->work); +queue_work (system_dfl_wq, &cdw->work);return true; }
drivers/base/dd.c +1 -1
@@ -192,7 +192,7 @@ void driver_deferred_probe_trigger(void)* Kick the re-probe thread. It may already be scheduled, but it is * safe to kick it again. */ -queue_work (system_unbound_wq, &deferred_probe_work); +queue_work (system_dfl_wq, &deferred_probe_work); }/**
drivers/char/random.c +4 -4
@@ -259,8 +259,8 @@ static void crng_reseed(struct work_struct *work)u8 key[CHACHA_KEY_SIZE ];/* Immediately schedule the next reseeding, so that it fires sooner rather than later. */ -if (likely (system_unbound_wq)) -queue_delayed_work (system_unbound_wq, &next_reseed,crng_reseed_interval ()); +if (likely (system_dfl_wq)) +queue_delayed_work (system_dfl_wq, &next_reseed,crng_reseed_interval ());extract_entropy (key,sizeof (key));
@@ -739,8 +739,8 @@ static void __cold _credit_init_bits(size_t bits)if (orig <POOL_READY_BITS && new >=POOL_READY_BITS ) {crng_reseed (NULL );/* Sets crng_init to CRNG_READY under base_crng.lock. */ -if (static_key_initialized && system_unbound_wq) -queue_work (system_unbound_wq, &set_ready); +if (static_key_initialized && system_dfl_wq) +queue_work (system_dfl_wq, &set_ready);atomic_notifier_call_chain (&random_ready_notifier,0 ,NULL );#ifdef CONFIG_VDSO_GETRANDOM WRITE_ONCE (vdso_k_rng_data->is_ready, true);
drivers/gpu/drm/amd/amdgpu/aldebaran.c +1 -1
@@ -164,7 +164,7 @@ aldebaran_mode2_perform_reset(struct amdgpu_reset_control *reset_ctl,list_for_each_entry (tmp_adev, reset_device_list, reset_list) {/* For XGMI run all resets in parallel to speed up the process */ if (tmp_adev->gmc.xgmi.num_physical_nodes >1 ) { -if (!queue_work (system_unbound_wq, +if (!queue_work (system_dfl_wq, &tmp_adev->reset_cntl->reset_work)) r = -EALREADY ; }else
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -5762,7 +5762,7 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,list_for_each_entry (tmp_adev, device_list_handle, reset_list) {/* For XGMI run all resets in parallel to speed up the process */ if (tmp_adev->gmc.xgmi.num_physical_nodes >1 ) { -if (!queue_work (system_unbound_wq, +if (!queue_work (system_dfl_wq, &tmp_adev->xgmi_reset_work)) r = -EALREADY ; }else
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c +1 -1
@@ -116,7 +116,7 @@ static int amdgpu_reset_xgmi_reset_on_init_perform_reset(/* Mode1 reset needs to be triggered on all devices together */ list_for_each_entry (tmp_adev, reset_device_list, reset_list) {/* For XGMI run all resets in parallel to speed up the process */ -if (!queue_work (system_unbound_wq, &tmp_adev->xgmi_reset_work)) +if (!queue_work (system_dfl_wq, &tmp_adev->xgmi_reset_work)) r = -EALREADY ;if (r) { dev_err(tmp_adev->dev,
drivers/gpu/drm/drm_atomic_helper.c +3 -3
@@ -2100,13 +2100,13 @@ int drm_atomic_helper_commit(struct drm_device *dev,* current layout. * * NOTE: Commit work has multiple phases, first hardware commit, then -* cleanup. We want them to overlap, hence need system_unbound_wq to +* cleanup. We want them to overlap, hence need system_dfl_wq to * make sure work items don't artificially stall on each another. */ drm_atomic_state_get (state);if (nonblock) -queue_work (system_unbound_wq, &state->commit_work); +queue_work (system_dfl_wq, &state->commit_work);else commit_tail (state);
@@ -2139,7 +2139,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit);* * Asynchronous workers need to have sufficient parallelism to be able to run * different atomic commits on different CRTCs in parallel. The simplest way to -* achieve this is by running them on the &system_unbound_wq work queue. Note +* achieve this is by running them on the &system_dfl_wq work queue. Note * that drivers are not required to split up atomic commits and run an * individual commit in parallel - userspace is supposed to do that if it cares. * But it might be beneficial to do that for modesets, since those necessarily
drivers/gpu/drm/i915/display/intel_display_power.c +1 -1
@@ -611,7 +611,7 @@ queue_async_put_domains_work(struct i915_power_domains *power_domains, power.domains);drm_WARN_ON (display->drm, power_domains->async_put_wakeref); power_domains->async_put_wakeref = wakeref; -drm_WARN_ON (display->drm, !queue_delayed_work (system_unbound_wq, +drm_WARN_ON (display->drm, !queue_delayed_work (system_dfl_wq, &power_domains->async_put_work,msecs_to_jiffies (delay_ms))); }
drivers/gpu/drm/i915/display/intel_tc.c +2 -2
@@ -1760,7 +1760,7 @@ bool intel_tc_port_link_reset(struct intel_digital_port *dig_port)if (!intel_tc_port_link_needs_reset (dig_port))return false; -queue_delayed_work (system_unbound_wq, +queue_delayed_work (system_dfl_wq, &to_tc_port (dig_port)->link_reset_work,msecs_to_jiffies (2000 ));
@@ -1842,7 +1842,7 @@ void intel_tc_port_unlock(struct intel_digital_port *dig_port)struct intel_tc_port *tc =to_tc_port (dig_port);if (!tc->link_refcount && tc->mode !=TC_PORT_DISCONNECTED ) -queue_delayed_work (system_unbound_wq, &tc->disconnect_phy_work, +queue_delayed_work (system_dfl_wq, &tc->disconnect_phy_work,msecs_to_jiffies (1000 ));mutex_unlock (&tc->lock);
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c +1 -1
@@ -408,7 +408,7 @@ static void __memcpy_cb(struct dma_fence *fence, struct dma_fence_cb *cb)if (unlikely (fence->error ||I915_SELFTEST_ONLY (fail_gpu_migration))) {INIT_WORK (©_work->work, __memcpy_work); -queue_work (system_unbound_wq, ©_work->work); +queue_work (system_dfl_wq, ©_work->work); }else {init_irq_work (©_work->irq_work, __memcpy_irq_work);irq_work_queue (©_work->irq_work);
drivers/gpu/drm/i915/gt/uc/intel_guc.c +2 -2
@@ -617,7 +617,7 @@ int intel_guc_crash_process_msg(struct intel_guc *guc, u32 action)else guc_err (guc,"Unknown crash notification: 0x%04X\n" , action); -queue_work (system_unbound_wq, &guc->dead_guc_worker); +queue_work (system_dfl_wq, &guc->dead_guc_worker);return 0 ; }
@@ -639,7 +639,7 @@ int intel_guc_to_host_process_recv_msg(struct intel_guc *guc,guc_err (guc,"Received early exception notification!\n" );if (msg & (INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED |INTEL_GUC_RECV_MSG_EXCEPTION )) -queue_work (system_unbound_wq, &guc->dead_guc_worker); +queue_work (system_dfl_wq, &guc->dead_guc_worker);return 0 ; }
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c +2 -2
@@ -30,7 +30,7 @@ static void ct_dead_ct_worker_func(struct work_struct *w); do { \ if (!(ct)->dead_ct_reported) { \ (ct)->dead_ct_reason |= 1 << CT_DEAD_##reason; \ - queue_work(system_unbound_wq, &(ct)->dead_ct_worker); \ + queue_work(system_dfl_wq, &(ct)->dead_ct_worker); \ } \ } while (0) #else
@@ -1240,7 +1240,7 @@ static int ct_handle_event(struct intel_guc_ct *ct, struct ct_incoming_msg *requlist_add_tail (&request->link, &ct->requests.incoming);spin_unlock_irqrestore (&ct->requests.lock, flags); -queue_work (system_unbound_wq, &ct->requests.worker); +queue_work (system_dfl_wq, &ct->requests.worker);return 0 ; }
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +3 -3
@@ -3385,7 +3385,7 @@ static void guc_context_sched_disable(struct intel_context *ce) }else if (!intel_context_is_closed (ce) && !guc_id_pressure (guc, ce) && delay) {spin_unlock_irqrestore (&ce->guc_state.lock, flags); -mod_delayed_work (system_unbound_wq, +mod_delayed_work (system_dfl_wq, &ce->guc_state.sched_disable_delay_work,msecs_to_jiffies (delay)); }else {
@@ -3600,7 +3600,7 @@ static void guc_context_destroy(struct kref *kref)* take the GT PM for the first time which isn't allowed from an atomic * context. */ -queue_work (system_unbound_wq, &guc->submission_state.destroyed_worker); +queue_work (system_dfl_wq, &guc->submission_state.destroyed_worker); }static int guc_context_alloc (struct intel_context *ce)
@@ -5371,7 +5371,7 @@ int intel_guc_engine_failure_process_msg(struct intel_guc *guc,* A GT reset flushes this worker queue (G2H handler) so we must use * another worker to trigger a GT reset. */ -queue_work (system_unbound_wq, &guc->submission_state.reset_fail_worker); +queue_work (system_dfl_wq, &guc->submission_state.reset_fail_worker);return 0 ; }
drivers/gpu/drm/i915/i915_active.c +1 -1
@@ -193,7 +193,7 @@ active_retire(struct i915_active *ref)return ;if (ref->flags &I915_ACTIVE_RETIRE_SLEEPS ) { -queue_work (system_unbound_wq, &ref->work); +queue_work (system_dfl_wq, &ref->work);return ; }
drivers/gpu/drm/i915/i915_sw_fence_work.c +1 -1
@@ -38,7 +38,7 @@ fence_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state)if (test_bit (DMA_FENCE_WORK_IMM , &f->dma.flags))fence_work (&f->work);else -queue_work (system_unbound_wq, &f->work); +queue_work (system_dfl_wq, &f->work); }else {fence_complete (f); }
drivers/gpu/drm/i915/i915_vma_resource.c +1 -1
@@ -202,7 +202,7 @@ i915_vma_resource_fence_notify(struct i915_sw_fence *fence,i915_vma_resource_unbind_work (&vma_res->work); }else {INIT_WORK (&vma_res->work, i915_vma_resource_unbind_work); -queue_work (system_unbound_wq, &vma_res->work); +queue_work (system_dfl_wq, &vma_res->work); }break ;case FENCE_FREE :
drivers/gpu/drm/i915/pxp/intel_pxp.c +1 -1
@@ -276,7 +276,7 @@ static void pxp_queue_termination(struct intel_pxp *pxp)spin_lock_irq (gt->irq_lock);intel_pxp_mark_termination_in_progress (pxp); pxp->session_events |=PXP_TERMINATION_REQUEST ; -queue_work (system_unbound_wq, &pxp->session_work); +queue_work (system_dfl_wq, &pxp->session_work);spin_unlock_irq (gt->irq_lock); }
drivers/gpu/drm/i915/pxp/intel_pxp_irq.c +1 -1
@@ -48,7 +48,7 @@ void intel_pxp_irq_handler(struct intel_pxp *pxp, u16 iir) pxp->session_events |=PXP_TERMINATION_COMPLETE |PXP_EVENT_TYPE_IRQ ;if (pxp->session_events) -queue_work (system_unbound_wq, &pxp->session_work); +queue_work (system_dfl_wq, &pxp->session_work); }static inline void __pxp_set_interrupts (struct intel_gt *gt,u32 interrupts)
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -1
@@ -2466,7 +2466,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,pm_runtime_get_noresume (dev->dev);if (nonblock) -queue_work (system_unbound_wq, &state->commit_work); +queue_work (system_dfl_wq, &state->commit_work);else nv50_disp_atomic_commit_tail (state);
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +1 -1
@@ -1771,7 +1771,7 @@ static void vop_handle_vblank(struct vop *vop)spin_unlock (&drm->event_lock);if (test_and_clear_bit (VOP_PENDING_FB_UNREF , &vop->pending)) -drm_flip_work_commit (&vop->fb_unref_work, system_unbound_wq); +drm_flip_work_commit (&vop->fb_unref_work, system_dfl_wq); }static irqreturn_t vop_isr (int irq,void *data)
drivers/gpu/drm/xe/xe_devcoredump.c +1 -1
@@ -316,7 +316,7 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump,xe_engine_snapshot_capture_for_queue (q); -queue_work (system_unbound_wq, &ss->work); +queue_work (system_dfl_wq, &ss->work);xe_force_wake_put (gt_to_fw (q->gt), fw_ref);dma_fence_end_signalling (cookie);
drivers/gpu/drm/xe/xe_execlist.c +1 -1
@@ -416,7 +416,7 @@ static void execlist_exec_queue_kill(struct xe_exec_queue *q)static void execlist_exec_queue_fini (struct xe_exec_queue *q) {INIT_WORK (&q->execlist->fini_async, execlist_exec_queue_fini_async); -queue_work (system_unbound_wq, &q->execlist->fini_async); +queue_work (system_dfl_wq, &q->execlist->fini_async); } static int execlist_exec_queue_set_priority(struct xe_exec_queue *q,
drivers/gpu/drm/xe/xe_guc_ct.c +2 -2
@@ -472,7 +472,7 @@ int xe_guc_ct_enable(struct xe_guc_ct *ct)spin_lock_irq (&ct->dead.lock);if (ct->dead.reason) { ct->dead.reason |= (1 <<CT_DEAD_STATE_REARM ); -queue_work (system_unbound_wq, &ct->dead.worker); +queue_work (system_dfl_wq, &ct->dead.worker); }spin_unlock_irq (&ct->dead.lock);#endif
@@ -1811,7 +1811,7 @@ static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reasospin_unlock_irqrestore (&ct->dead.lock, flags); -queue_work (system_unbound_wq, &(ct)->dead.worker); +queue_work (system_dfl_wq, &(ct)->dead.worker); }static void ct_dead_print (struct xe_dead_ct *dead)
drivers/gpu/drm/xe/xe_oa.c +1 -1
@@ -956,7 +956,7 @@ static void xe_oa_config_cb(struct dma_fence *fence, struct dma_fence_cb *cb)struct xe_oa_fence *ofence =container_of (cb,typeof (*ofence), cb);INIT_DELAYED_WORK (&ofence->work, xe_oa_fence_work_fn); -queue_delayed_work (system_unbound_wq, &ofence->work, +queue_delayed_work (system_dfl_wq, &ofence->work,usecs_to_jiffies (NOA_PROGRAM_ADDITIONAL_DELAY_US ));dma_fence_put (fence); }
drivers/gpu/drm/xe/xe_vm.c +2 -2
@@ -1289,7 +1289,7 @@ static void vma_destroy_cb(struct dma_fence *fence, struct xe_vma *vma = container_of(cb, struct xe_vma, destroy_cb);INIT_WORK (&vma->destroy_work, vma_destroy_work_func); -queue_work (system_unbound_wq, &vma->destroy_work); +queue_work (system_dfl_wq, &vma->destroy_work); }static void xe_vma_destroy (struct xe_vma *vma,struct dma_fence *fence)
@@ -1973,7 +1973,7 @@ static void xe_vm_free(struct drm_gpuvm *gpuvm) struct xe_vm *vm = container_of(gpuvm, struct xe_vm, gpuvm);/* To destroy the VM we need to be able to sleep */ -queue_work (system_unbound_wq, &vm->destroy_work); +queue_work (system_dfl_wq, &vm->destroy_work); }struct xe_vm *xe_vm_lookup (struct xe_file *xef,u32 id)
drivers/hte/hte.c +1 -1
@@ -826,7 +826,7 @@ int hte_push_ts_ns(const struct hte_chip *chip, u32 xlated_id, ret = ei->cb (data, ei->cl_data);if (ret ==HTE_RUN_SECOND_CB && ei->tcb) { -queue_work (system_unbound_wq, &ei->cb_work); +queue_work (system_dfl_wq, &ei->cb_work);set_bit (HTE_TS_QUEUE_WK , &ei->flags); }
drivers/infiniband/core/ucma.c +1 -1
@@ -361,7 +361,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,if (event->event ==RDMA_CM_EVENT_DEVICE_REMOVAL ) {xa_lock (&ctx_table);if (xa_load (&ctx_table, ctx->id) == ctx) -queue_work (system_unbound_wq, &ctx->close_work); +queue_work (system_dfl_wq, &ctx->close_work);xa_unlock (&ctx_table); }return 0 ;
drivers/infiniband/hw/mlx5/odp.c +2 -2
@@ -253,7 +253,7 @@ static void destroy_unused_implicit_child_mr(struct mlx5_ib_mr *mr)/* Freeing a MR is a sleeping operation, so bounce to a work queue */ INIT_WORK (&mr->odp_destroy.work, free_implicit_child_mr_work); -queue_work (system_unbound_wq, &mr->odp_destroy.work); +queue_work (system_dfl_wq, &mr->odp_destroy.work); } static bool mlx5_ib_invalidate_range(struct mmu_interval_notifier *mni,
@@ -2062,6 +2062,6 @@ int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,destroy_prefetch_work (work);return rc; } -queue_work (system_unbound_wq, &work->work); +queue_work (system_dfl_wq, &work->work);return 0 ; }
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +4 -4
@@ -1735,7 +1735,7 @@ static void process_signal_change(struct snps_hdmirx_dev *hdmirx_dev)FIFO_UNDERFLOW_INT_EN | HDMIRX_AXI_ERROR_INT_EN, 0);hdmirx_reset_dma (hdmirx_dev); -queue_delayed_work (system_unbound_wq, +queue_delayed_work (system_dfl_wq, &hdmirx_dev->delayed_work_res_change,msecs_to_jiffies (50 )); }
@@ -2190,7 +2190,7 @@ static void hdmirx_delayed_work_res_change(struct work_struct *work)if (hdmirx_wait_signal_lock (hdmirx_dev)) {hdmirx_plugout (hdmirx_dev); -queue_delayed_work (system_unbound_wq, +queue_delayed_work (system_dfl_wq, &hdmirx_dev->delayed_work_hotplug,msecs_to_jiffies (200 )); }else {
@@ -2209,7 +2209,7 @@ static irqreturn_t hdmirx_5v_det_irq_handler(int irq, void *dev_id) val =gpiod_get_value (hdmirx_dev->detect_5v_gpio);v4l2_dbg (3 , debug, &hdmirx_dev->v4l2_dev,"%s: 5v:%d\n" , __func__, val); -queue_delayed_work (system_unbound_wq, +queue_delayed_work (system_dfl_wq, &hdmirx_dev->delayed_work_hotplug,msecs_to_jiffies (10 ));
@@ -2441,7 +2441,7 @@ static void hdmirx_enable_irq(struct device *dev)enable_irq (hdmirx_dev->dma_irq);enable_irq (hdmirx_dev->det_irq); -queue_delayed_work (system_unbound_wq, +queue_delayed_work (system_dfl_wq, &hdmirx_dev->delayed_work_hotplug,msecs_to_jiffies (110 )); }
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -5292,7 +5292,7 @@ void qla24xx_sched_upd_fcport(fc_port_t *fcport)qla2x00_set_fcport_disc_state (fcport,DSC_UPD_FCPORT );spin_unlock_irqrestore (&fcport->vha->work_lock, flags); -queue_work (system_unbound_wq, &fcport->reg_work); +queue_work (system_dfl_wq, &fcport->reg_work); } static
drivers/scsi/scsi_transport_iscsi.c +1 -1
@@ -3957,7 +3957,7 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, uint32_t *group)list_del_init (&session->sess_list);spin_unlock_irqrestore (&sesslock, flags); -queue_work (system_unbound_wq, &session->destroy_work); +queue_work (system_dfl_wq, &session->destroy_work); }break ;case ISCSI_UEVENT_UNBIND_SESSION :
drivers/soc/xilinx/zynqmp_power.c +3 -3
@@ -82,7 +82,7 @@ static void subsystem_restart_event_callback(const u32 *payload, void *data)memcpy (zynqmp_pm_init_restart_work->args, &payload[0 ],sizeof (zynqmp_pm_init_restart_work->args)); -queue_work (system_unbound_wq, &zynqmp_pm_init_restart_work->callback_work); +queue_work (system_dfl_wq, &zynqmp_pm_init_restart_work->callback_work); }static void suspend_event_callback (const u32 *payload,void *data)
@@ -95,7 +95,7 @@ static void suspend_event_callback(const u32 *payload, void *data)memcpy (zynqmp_pm_init_suspend_work->args, &payload[1 ],sizeof (zynqmp_pm_init_suspend_work->args)); -queue_work (system_unbound_wq, &zynqmp_pm_init_suspend_work->callback_work); +queue_work (system_dfl_wq, &zynqmp_pm_init_suspend_work->callback_work); }static irqreturn_t zynqmp_pm_isr (int irq,void *data)
@@ -140,7 +140,7 @@ static void ipi_receive_callback(struct mbox_client *cl, void *data)memcpy (zynqmp_pm_init_suspend_work->args, &payload[1 ],sizeof (zynqmp_pm_init_suspend_work->args)); -queue_work (system_unbound_wq, +queue_work (system_dfl_wq, &zynqmp_pm_init_suspend_work->callback_work);/* Send NULL message to mbox controller to ack the message */
drivers/target/sbp/sbp_target.c +4 -4
@@ -730,7 +730,7 @@ static int tgt_agent_rw_orb_pointer(struct fw_card *card, int tcode, void *data,pr_debug ("tgt_agent ORB_POINTER write: 0x%llx\n" , agent->orb_pointer); -queue_work (system_unbound_wq, &agent->work); +queue_work (system_dfl_wq, &agent->work);return RCODE_COMPLETE ;
@@ -764,7 +764,7 @@ static int tgt_agent_rw_doorbell(struct fw_card *card, int tcode, void *data,pr_debug ("tgt_agent DOORBELL\n" ); -queue_work (system_unbound_wq, &agent->work); +queue_work (system_dfl_wq, &agent->work);return RCODE_COMPLETE ;
@@ -990,7 +990,7 @@ static void tgt_agent_fetch_work(struct work_struct *work)if (tgt_agent_check_active (agent) && !doorbell) {INIT_WORK (&req->work, tgt_agent_process_work); -queue_work (system_unbound_wq, &req->work); +queue_work (system_dfl_wq, &req->work); }else {/* don't process this request, just check next_ORB */ sbp_free_request (req);
@@ -1618,7 +1618,7 @@ static void sbp_mgt_agent_rw(struct fw_card *card, agent->orb_offset =sbp2_pointer_to_addr (ptr); agent->request = req; -queue_work (system_unbound_wq, &agent->work); +queue_work (system_dfl_wq, &agent->work); rcode =RCODE_COMPLETE ; }else if (tcode ==TCODE_READ_BLOCK_REQUEST ) {addr_to_sbp2_pointer (agent->orb_offset, ptr);
drivers/tty/serial/8250/8250_dw.c +2 -2
@@ -361,7 +361,7 @@ static int dw8250_clk_notifier_cb(struct notifier_block *nb,* deferred event handling complication. */ if (event ==POST_RATE_CHANGE ) { -queue_work (system_unbound_wq, &d->clk_work); +queue_work (system_dfl_wq, &d->clk_work);return NOTIFY_OK ; }
@@ -678,7 +678,7 @@ static int dw8250_probe(struct platform_device *pdev) err =clk_notifier_register (data->clk, &data->clk_notifier);if (err)return dev_err_probe (dev, err,"Failed to set the clock notifier\n" ); -queue_work (system_unbound_wq, &data->clk_work); +queue_work (system_dfl_wq, &data->clk_work); }platform_set_drvdata (pdev, data);
drivers/tty/tty_buffer.c +4 -4
@@ -76,7 +76,7 @@ void tty_buffer_unlock_exclusive(struct tty_port *port)mutex_unlock (&buf->lock);if (restart) -queue_work (system_unbound_wq, &buf->work); +queue_work (system_dfl_wq, &buf->work); }EXPORT_SYMBOL_GPL (tty_buffer_unlock_exclusive);
@@ -531,7 +531,7 @@ void tty_flip_buffer_push(struct tty_port *port)struct tty_bufhead *buf = &port->buf;tty_flip_buffer_commit (buf->tail); -queue_work (system_unbound_wq, &buf->work); +queue_work (system_dfl_wq, &buf->work); }EXPORT_SYMBOL (tty_flip_buffer_push);
@@ -561,7 +561,7 @@ int tty_insert_flip_string_and_push_buffer(struct tty_port *port,tty_flip_buffer_commit (buf->tail);spin_unlock_irqrestore (&port->lock, flags); -queue_work (system_unbound_wq, &buf->work); +queue_work (system_dfl_wq, &buf->work);return size; }
@@ -614,7 +614,7 @@ void tty_buffer_set_lock_subclass(struct tty_port *port)bool tty_buffer_restart_work (struct tty_port *port) { -return queue_work (system_unbound_wq, &port->buf.work); +return queue_work (system_dfl_wq, &port->buf.work); }bool tty_buffer_cancel_work (struct tty_port *port)
Signature · 1 line
2.51.0
PATCH 2/3 drivers: replace use of system_wq with system_percpu_wq
In reply to Marco CrivellariCurrently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use 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 consistentcy cannot be addressed without refactoring the API.
system_unbound_wq should be the default workqueue so as not to enforce locality constraints for random work whenever it's not required.
Adding system_dfl_wq to encourage its use when unbound work should be used.
queue_work() / queue_delayed_work() / mod_delayed_work() will now use the new unbound wq: whether the user still use the old wq a warn will be printed along with a wq redirect to the new one.
The old system_unbound_wq will be kept for a few release cycles.
--- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_ipc.c | 2 +- drivers/accel/ivpu/ivpu_job.c | 2 +- drivers/accel/ivpu/ivpu_mmu.c | 2 +- drivers/accel/ivpu/ivpu_pm.c | 2 +- drivers/acpi/osl.c | 2 +- drivers/base/devcoredump.c | 2 +- drivers/cxl/pci.c | 2 +- drivers/extcon/extcon-intel-int3496.c | 4 ++-- drivers/gpio/gpiolib-cdev.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- drivers/gpu/drm/bridge/ti-tfp410.c | 2 +- drivers/gpu/drm/drm_probe_helper.c | 2 +- drivers/gpu/drm/drm_self_refresh_helper.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- .../gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 4 ++-- drivers/gpu/drm/scheduler/sched_main.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++-- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 6 +++--- drivers/gpu/drm/xe/xe_pt.c | 2 +- drivers/iio/adc/pac1934.c | 2 +- drivers/input/keyboard/gpio_keys.c | 2 +- drivers/input/misc/palmas-pwrbutton.c | 2 +- drivers/input/mouse/synaptics_i2c.c | 8 ++++---- drivers/leds/trigger/ledtrig-input-events.c | 2 +- drivers/md/bcache/super.c | 20 +++++++++---------- drivers/mmc/host/mtk-sd.c | 4 ++-- drivers/nvdimm/security.c | 4 ++-- drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/fabrics-cmd-auth.c | 2 +- drivers/pci/endpoint/pci-ep-cfs.c | 2 +- drivers/phy/allwinner/phy-sun4i-usb.c | 14 ++++++------- .../platform/cznic/turris-omnia-mcu-gpio.c | 2 +- .../surface/aggregator/ssh_packet_layer.c | 2 +- .../surface/aggregator/ssh_request_layer.c | 2 +- drivers/platform/x86/gpd-pocket-fan.c | 4 ++-- .../x86/x86-android-tablets/vexia_atla10_ec.c | 2 +- drivers/ras/cec.c | 2 +- drivers/regulator/irq_helpers.c | 2 +- drivers/regulator/qcom-labibb-regulator.c | 4 ++-- drivers/thunderbolt/tb.c | 2 +- drivers/usb/dwc3/gadget.c | 2 +- drivers/usb/host/xhci-dbgcap.c | 8 ++++---- drivers/usb/host/xhci-ring.c | 2 +- drivers/xen/events/events_base.c | 6 +++--- 49 files changed, 83 insertions(+), 83 deletions(-)
drivers/accel/ivpu/ivpu_hw_btrs.c +1 -1
@@ -630,7 +630,7 @@ bool ivpu_hw_btrs_irq_handler_lnl(struct ivpu_device *vdev, int irq)if (REG_TEST_FLD (VPU_HW_BTRS_LNL_INTERRUPT_STAT ,SURV_ERR , status)) {ivpu_dbg (vdev,IRQ ,"Survivability IRQ\n" ); -queue_work (system_wq, &vdev->irq_dct_work); +queue_work (system_percpu_wq, &vdev->irq_dct_work); }if (REG_TEST_FLD (VPU_HW_BTRS_LNL_INTERRUPT_STAT ,FREQ_CHANGE , status))
drivers/accel/ivpu/ivpu_ipc.c +1 -1
@@ -459,7 +459,7 @@ void ivpu_ipc_irq_handler(struct ivpu_device *vdev) } } -queue_work (system_wq, &vdev->irq_ipc_work); +queue_work (system_percpu_wq, &vdev->irq_ipc_work); }void ivpu_ipc_irq_work_fn (struct work_struct *work)
drivers/accel/ivpu/ivpu_job.c +1 -1
@@ -549,7 +549,7 @@ static int ivpu_job_signal_and_destroy(struct ivpu_device *vdev, u32 job_id, u32* status and ensure both are handled in the same way */ job->file_priv->has_mmu_faults = true; -queue_work (system_wq, &vdev->context_abort_work); +queue_work (system_percpu_wq, &vdev->context_abort_work);return 0 ; }
drivers/accel/ivpu/ivpu_mmu.c +1 -1
@@ -970,7 +970,7 @@ void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev) } } -queue_work (system_wq, &vdev->context_abort_work); +queue_work (system_percpu_wq, &vdev->context_abort_work); }void ivpu_mmu_evtq_dump (struct ivpu_device *vdev)
drivers/accel/ivpu/ivpu_pm.c +1 -1
@@ -198,7 +198,7 @@ void ivpu_start_job_timeout_detection(struct ivpu_device *vdev)unsigned long timeout_ms = ivpu_tdr_timeout_ms ? ivpu_tdr_timeout_ms : vdev->timeout.tdr;/* No-op if already queued */ -queue_delayed_work (system_wq, &vdev->pm->job_timeout_work,msecs_to_jiffies (timeout_ms)); +queue_delayed_work (system_percpu_wq, &vdev->pm->job_timeout_work,msecs_to_jiffies (timeout_ms)); }void ivpu_stop_job_timeout_detection (struct ivpu_device *vdev)
drivers/acpi/osl.c +1 -1
@@ -398,7 +398,7 @@ static void acpi_os_drop_map_ref(struct acpi_ioremap *map)list_del_rcu (&map->list);INIT_RCU_WORK (&map->track.rwork, acpi_os_map_remove); -queue_rcu_work (system_wq, &map->track.rwork); +queue_rcu_work (system_percpu_wq, &map->track.rwork); }/**
drivers/base/devcoredump.c +1 -1
@@ -125,7 +125,7 @@ static ssize_t devcd_data_write(struct file *filp, struct kobject *kobj,mutex_lock (&devcd->mutex);if (!devcd->delete_work) { devcd->delete_work = true; -mod_delayed_work (system_wq, &devcd->del_wk,0 ); +mod_delayed_work (system_percpu_wq, &devcd->del_wk,0 ); }mutex_unlock (&devcd->mutex);
drivers/cxl/pci.c +1 -1
@@ -136,7 +136,7 @@ static irqreturn_t cxl_pci_mbox_irq(int irq, void *id)if (opcode ==CXL_MBOX_OP_SANITIZE ) {mutex_lock (&cxl_mbox->mbox_mutex);if (mds->security.sanitize_node) -mod_delayed_work (system_wq, &mds->security.poll_dwork,0 ); +mod_delayed_work (system_percpu_wq, &mds->security.poll_dwork,0 );mutex_unlock (&cxl_mbox->mbox_mutex); }else {/* short-circuit the wait in __cxl_pci_mbox_send_cmd() */
drivers/extcon/extcon-intel-int3496.c +2 -2
@@ -106,7 +106,7 @@ static irqreturn_t int3496_thread_isr(int irq, void *priv)struct int3496_data *data = priv;/* Let the pin settle before processing it */ -mod_delayed_work (system_wq, &data->work,DEBOUNCE_TIME ); +mod_delayed_work (system_percpu_wq, &data->work,DEBOUNCE_TIME );return IRQ_HANDLED ; }
@@ -181,7 +181,7 @@ static int int3496_probe(struct platform_device *pdev) }/* process id-pin so that we start with the right status */ -queue_delayed_work (system_wq, &data->work,0 ); +queue_delayed_work (system_percpu_wq, &data->work,0 );flush_delayed_work (&data->work);platform_set_drvdata (pdev, data);
drivers/gpio/gpiolib-cdev.c +2 -2
@@ -700,7 +700,7 @@ static enum hte_return process_hw_ts(struct hte_ts_data *ts, void *p)if (READ_ONCE (line->sw_debounced)) { line->total_discard_seq++; line->last_seqno = ts->seq; -mod_delayed_work (system_wq, &line->work, +mod_delayed_work (system_percpu_wq, &line->work,usecs_to_jiffies (READ_ONCE (line->desc->debounce_period_us))); }else {if (unlikely (ts->seq < line->line_seqno))
@@ -841,7 +841,7 @@ static irqreturn_t debounce_irq_handler(int irq, void *p) {struct line *line = p; -mod_delayed_work (system_wq, &line->work, +mod_delayed_work (system_percpu_wq, &line->work,usecs_to_jiffies (READ_ONCE (line->desc->debounce_period_us)));return IRQ_HANDLED ;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -4610,7 +4610,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, }/* must succeed. */ amdgpu_ras_resume (adev); -queue_delayed_work (system_wq, &adev->delayed_init_work, +queue_delayed_work (system_percpu_wq, &adev->delayed_init_work,msecs_to_jiffies (AMDGPU_RESUME_MS )); }
@@ -5085,7 +5085,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)if (r) goto exit; -queue_delayed_work (system_wq, &adev->delayed_init_work, +queue_delayed_work (system_percpu_wq, &adev->delayed_init_work,msecs_to_jiffies (AMDGPU_RESUME_MS )); exit:if (amdgpu_sriov_vf (adev)) {
drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -2082,7 +2082,7 @@ static void it6505_start_hdcp(struct it6505 *it6505)DRM_DEV_DEBUG_DRIVER (dev,"start" );it6505_reset_hdcp (it6505); -queue_delayed_work (system_wq, &it6505->hdcp_work, +queue_delayed_work (system_percpu_wq, &it6505->hdcp_work,msecs_to_jiffies (2400 )); }
drivers/gpu/drm/bridge/ti-tfp410.c +1 -1
@@ -115,7 +115,7 @@ static void tfp410_hpd_callback(void *arg, enum drm_connector_status status) {struct tfp410 *dvi = arg; -mod_delayed_work (system_wq, &dvi->hpd_work, +mod_delayed_work (system_percpu_wq, &dvi->hpd_work,msecs_to_jiffies (HOTPLUG_DEBOUNCE_MS )); }
drivers/gpu/drm/drm_probe_helper.c +1 -1
@@ -625,7 +625,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,*/ dev->mode_config.delayed_event = true;if (dev->mode_config.poll_enabled) -mod_delayed_work (system_wq, +mod_delayed_work (system_percpu_wq, &dev->mode_config.output_poll_work,0 ); }
drivers/gpu/drm/drm_self_refresh_helper.c +1 -1
@@ -217,7 +217,7 @@ void drm_self_refresh_helper_alter_state(struct drm_atomic_state *state) ewma_psr_time_read(&sr_data->exit_avg_ms)) * 2;mutex_unlock (&sr_data->avg_mutex); -mod_delayed_work (system_wq, &sr_data->entry_work, +mod_delayed_work (system_percpu_wq, &sr_data->entry_work,msecs_to_jiffies (delay)); } }
drivers/gpu/drm/exynos/exynos_hdmi.c +1 -1
@@ -1692,7 +1692,7 @@ static irqreturn_t hdmi_irq_thread(int irq, void *arg) {struct hdmi_context *hdata = arg; -mod_delayed_work (system_wq, &hdata->hotplug_work, +mod_delayed_work (system_percpu_wq, &hdata->hotplug_work,msecs_to_jiffies (HOTPLUG_DEBOUNCE_MS ));return IRQ_HANDLED ;
drivers/gpu/drm/i915/i915_driver.c +1 -1
@@ -141,7 +141,7 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)/* * The unordered i915 workqueue should be used for all work * scheduling that do not require running in order, which used -* to be scheduled on the system_wq before moving to a driver +* to be scheduled on the system_percpu_wq before moving to a driver * instance due deprecation of flush_scheduled_work(). */ dev_priv->unordered_wq =alloc_workqueue ("i915-unordered" ,0 ,0 );
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -264,7 +264,7 @@ struct drm_i915_private {* * This workqueue should be used for all unordered work * scheduling within i915, which used to be scheduled on the -* system_wq before moving to a driver instance due +* system_percpu_wq before moving to a driver instance due * deprecation of flush_scheduled_work(). */ struct workqueue_struct *unordered_wq;
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +2 -2
@@ -274,7 +274,7 @@ static irqreturn_t dw_hdmi_qp_rk3576_irq(int irq, void *dev_id) val =HIWORD_UPDATE (RK3576_HDMI_HPD_INT_CLR ,RK3576_HDMI_HPD_INT_CLR );regmap_write (hdmi->regmap,RK3576_IOC_MISC_CON0 , val); -mod_delayed_work (system_wq, &hdmi->hpd_work, +mod_delayed_work (system_percpu_wq, &hdmi->hpd_work,msecs_to_jiffies (HOTPLUG_DEBOUNCE_MS )); val =HIWORD_UPDATE (0 ,RK3576_HDMI_HPD_INT_MSK );
@@ -321,7 +321,7 @@ static irqreturn_t dw_hdmi_qp_rk3588_irq(int irq, void *dev_id) RK3588_HDMI0_HPD_INT_CLR);regmap_write (hdmi->regmap,RK3588_GRF_SOC_CON2 , val); -mod_delayed_work (system_wq, &hdmi->hpd_work, +mod_delayed_work (system_percpu_wq, &hdmi->hpd_work,msecs_to_jiffies (HOTPLUG_DEBOUNCE_MS ));if (hdmi->port_id)
drivers/gpu/drm/scheduler/sched_main.c +1 -1
@@ -1260,7 +1260,7 @@ int drm_sched_init(struct drm_gpu_scheduler *sched, const struct drm_sched_init_ sched->name = args->name; sched->timeout = args->timeout; sched->hang_limit = args->hang_limit; - sched->timeout_wq = args->timeout_wq ? args->timeout_wq : system_wq; + sched->timeout_wq = args->timeout_wq ? args->timeout_wq : system_percpu_wq; sched->score = args->score ? args->score : &sched->_score; sched->dev = args->dev;
drivers/gpu/drm/tilcdc/tilcdc_crtc.c +1 -1
@@ -985,7 +985,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)dev_err (dev->dev,"%s(0x%08x): Sync lost flood detected, recovering" , __func__, stat); -queue_work (system_wq, +queue_work (system_percpu_wq, &tilcdc_crtc->recover_work);tilcdc_write (dev,LCDC_INT_ENABLE_CLR_REG ,LCDC_SYNC_LOST );
drivers/gpu/drm/vc4/vc4_hdmi.c +2 -2
@@ -744,7 +744,7 @@ static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder) vc4_hdmi->scdc_enabled = true; -queue_delayed_work (system_wq, &vc4_hdmi->scrambling_work, +queue_delayed_work (system_percpu_wq, &vc4_hdmi->scrambling_work,msecs_to_jiffies (SCRAMBLING_POLLING_DELAY_MS )); }
@@ -793,7 +793,7 @@ static void vc4_hdmi_scrambling_wq(struct work_struct *work)drm_scdc_set_high_tmds_clock_ratio (connector, true);drm_scdc_set_scrambling (connector, true); -queue_delayed_work (system_wq, &vc4_hdmi->scrambling_work, +queue_delayed_work (system_percpu_wq, &vc4_hdmi->scrambling_work,msecs_to_jiffies (SCRAMBLING_POLLING_DELAY_MS )); }
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +3 -3
@@ -99,7 +99,7 @@ static void xe_gt_tlb_fence_timeout(struct work_struct *work)invalidation_fence_signal (xe, fence); }if (!list_empty (>->tlb_invalidation.pending_fences)) -queue_delayed_work (system_wq, +queue_delayed_work (system_percpu_wq, >->tlb_invalidation.fence_tdr,tlb_timeout_jiffies (gt));spin_unlock_irq (>->tlb_invalidation.pending_lock);
@@ -218,7 +218,7 @@ static int send_tlb_invalidation(struct xe_guc *guc, >->tlb_invalidation.pending_fences);if (list_is_singular (>->tlb_invalidation.pending_fences)) -queue_delayed_work (system_wq, +queue_delayed_work (system_percpu_wq, >->tlb_invalidation.fence_tdr,tlb_timeout_jiffies (gt)); }
@@ -512,7 +512,7 @@ int xe_guc_tlb_invalidation_done_handler(struct xe_guc *guc, u32 *msg, u32 len) }if (!list_empty (>->tlb_invalidation.pending_fences)) -mod_delayed_work (system_wq, +mod_delayed_work (system_percpu_wq, >->tlb_invalidation.fence_tdr,tlb_timeout_jiffies (gt));else
drivers/gpu/drm/xe/xe_pt.c +1 -1
@@ -1474,7 +1474,7 @@ static void invalidation_fence_cb(struct dma_fence *fence,trace_xe_gt_tlb_invalidation_fence_cb (xe, &ifence->base);if (!ifence->fence->error) { -queue_work (system_wq, &ifence->work); +queue_work (system_percpu_wq, &ifence->work); }else { ifence->base.base.error = ifence->fence->error;xe_gt_tlb_invalidation_fence_signal (&ifence->base);
drivers/iio/adc/pac1934.c +1 -1
@@ -767,7 +767,7 @@ static int pac1934_retrieve_data(struct pac1934_chip_info *info,* Re-schedule the work for the read registers on timeout * (to prevent chip registers saturation) */ -mod_delayed_work (system_wq, &info->work_chip_rfsh, +mod_delayed_work (system_percpu_wq, &info->work_chip_rfsh,msecs_to_jiffies (PAC1934_MAX_RFSH_LIMIT_MS )); }
drivers/input/keyboard/gpio_keys.c +1 -1
@@ -434,7 +434,7 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)ms_to_ktime (bdata->software_debounce), HRTIMER_MODE_REL); }else { -mod_delayed_work (system_wq, +mod_delayed_work (system_percpu_wq, &bdata->work,msecs_to_jiffies (bdata->software_debounce)); }
drivers/input/misc/palmas-pwrbutton.c +1 -1
@@ -91,7 +91,7 @@ static irqreturn_t pwron_irq(int irq, void *palmas_pwron)pm_wakeup_event (input_dev->dev.parent,0 );input_sync (input_dev); -mod_delayed_work (system_wq, &pwron->input_work, +mod_delayed_work (system_percpu_wq, &pwron->input_work,msecs_to_jiffies (PALMAS_PWR_KEY_Q_TIME_MS ));return IRQ_HANDLED ;
drivers/input/mouse/synaptics_i2c.c +4 -4
@@ -372,7 +372,7 @@ static irqreturn_t synaptics_i2c_irq(int irq, void *dev_id) {struct synaptics_i2c *touch = dev_id; -mod_delayed_work (system_wq, &touch->dwork,0 ); +mod_delayed_work (system_percpu_wq, &touch->dwork,0 );return IRQ_HANDLED ; }
@@ -448,7 +448,7 @@ static void synaptics_i2c_work_handler(struct work_struct *work)* We poll the device once in THREAD_IRQ_SLEEP_SECS and * if error is detected, we try to reset and reconfigure the touchpad. */ -mod_delayed_work (system_wq, &touch->dwork, delay); +mod_delayed_work (system_percpu_wq, &touch->dwork, delay); }static int synaptics_i2c_open (struct input_dev *input)
@@ -461,7 +461,7 @@ static int synaptics_i2c_open(struct input_dev *input)return ret;if (polling_req) -mod_delayed_work (system_wq, &touch->dwork, +mod_delayed_work (system_percpu_wq, &touch->dwork,msecs_to_jiffies (NO_DATA_SLEEP_MSECS ));return 0 ;
@@ -620,7 +620,7 @@ static int synaptics_i2c_resume(struct device *dev)if (ret)return ret; -mod_delayed_work (system_wq, &touch->dwork, +mod_delayed_work (system_percpu_wq, &touch->dwork,msecs_to_jiffies (NO_DATA_SLEEP_MSECS ));return 0 ;
drivers/leds/trigger/ledtrig-input-events.c +1 -1
@@ -66,7 +66,7 @@ static void input_events_event(struct input_handle *handle, unsigned int type,spin_unlock_irqrestore (&data->lock, flags); -mod_delayed_work (system_wq, &data->work, led_off_delay); +mod_delayed_work (system_percpu_wq, &data->work, led_off_delay); } static int input_events_connect(struct input_handler *handler, struct input_dev *dev,
drivers/md/bcache/super.c +10 -10
@@ -1388,7 +1388,7 @@ static CLOSURE_CALLBACK(cached_dev_flush)bch_cache_accounting_destroy (&dc->accounting);kobject_del (&d->kobj); -continue_at (cl, cached_dev_free, system_wq); +continue_at (cl, cached_dev_free, system_percpu_wq); }static int cached_dev_init (struct cached_dev *dc,unsigned int block_size)
@@ -1400,7 +1400,7 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size)__module_get (THIS_MODULE );INIT_LIST_HEAD (&dc->list);closure_init (&dc->disk.cl,NULL ); -set_closure_fn (&dc->disk.cl, cached_dev_flush, system_wq); +set_closure_fn (&dc->disk.cl, cached_dev_flush, system_percpu_wq);kobject_init (&dc->disk.kobj, &bch_cached_dev_ktype);INIT_WORK (&dc->detach, cached_dev_detach_finish);sema_init (&dc->sb_write_mutex,1 );
@@ -1513,7 +1513,7 @@ static CLOSURE_CALLBACK(flash_dev_flush)bcache_device_unlink (d);mutex_unlock (&bch_register_lock);kobject_del (&d->kobj); -continue_at (cl, flash_dev_free, system_wq); +continue_at (cl, flash_dev_free, system_percpu_wq); }static int flash_dev_run (struct cache_set *c,struct uuid_entry *u)
@@ -1525,7 +1525,7 @@ static int flash_dev_run(struct cache_set *c, struct uuid_entry *u) goto err_ret;closure_init (&d->cl,NULL ); -set_closure_fn (&d->cl, flash_dev_flush, system_wq); +set_closure_fn (&d->cl, flash_dev_flush, system_percpu_wq);kobject_init (&d->kobj, &bch_flash_dev_ktype);
@@ -1828,7 +1828,7 @@ static CLOSURE_CALLBACK(__cache_set_unregister)mutex_unlock (&bch_register_lock); -continue_at (cl, cache_set_flush, system_wq); +continue_at (cl, cache_set_flush, system_percpu_wq); }void bch_cache_set_stop (struct cache_set *c)
@@ -1858,10 +1858,10 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)__module_get (THIS_MODULE );closure_init (&c->cl,NULL ); -set_closure_fn (&c->cl, cache_set_free, system_wq); +set_closure_fn (&c->cl, cache_set_free, system_percpu_wq);closure_init (&c->caching, &c->cl); -set_closure_fn (&c->caching, __cache_set_unregister, system_wq); +set_closure_fn (&c->caching, __cache_set_unregister, system_percpu_wq);/* Maybe create continue_at_noreturn() and use it here? */ closure_set_stopped (&c->cl);
@@ -2493,7 +2493,7 @@ static void register_device_async(struct async_reg_args *args)INIT_DELAYED_WORK (&args->reg_work, register_cache_worker);/* 10 jiffies is enough for a delay */ -queue_delayed_work (system_wq, &args->reg_work,10 ); +queue_delayed_work (system_percpu_wq, &args->reg_work,10 ); }static void *alloc_holder_object (struct cache_sb *sb)
@@ -2874,11 +2874,11 @@ static int __init bcache_init(void)/* * Let's not make this `WQ_MEM_RECLAIM` for the following reasons: * -* 1. It used `system_wq` before which also does no memory reclaim. +* 1. It used `system_percpu_wq` before which also does no memory reclaim. * 2. With `WQ_MEM_RECLAIM` desktop stalls, increased boot times, and * reduced throughput can be observed. * -* We still want to user our own queue to not congest the `system_wq`. +* We still want to user our own queue to not congest the `system_percpu_wq`. */ bch_flush_wq =alloc_workqueue ("bch_flush" ,0 ,0 );if (!bch_flush_wq)
drivers/mmc/host/mtk-sd.c +2 -2
@@ -1190,7 +1190,7 @@ static void msdc_start_data(struct msdc_host *host, struct mmc_command *cmd, host->data = data; read = data->flags &MMC_DATA_READ ; -mod_delayed_work (system_wq, &host->req_timeout,DAT_TIMEOUT ); +mod_delayed_work (system_percpu_wq, &host->req_timeout,DAT_TIMEOUT );msdc_dma_setup (host, &host->dma, data);sdr_set_bits (host->base +MSDC_INTEN , data_ints_mask);sdr_set_field (host->base +MSDC_DMA_CTRL ,MSDC_DMA_CTRL_START ,1 );
@@ -1420,7 +1420,7 @@ static void msdc_start_command(struct msdc_host *host,WARN_ON (host->cmd); host->cmd = cmd; -mod_delayed_work (system_wq, &host->req_timeout,DAT_TIMEOUT ); +mod_delayed_work (system_percpu_wq, &host->req_timeout,DAT_TIMEOUT );if (!msdc_cmd_is_ready (host, mrq, cmd))return ;
drivers/nvdimm/security.c +2 -2
@@ -427,7 +427,7 @@ static int security_overwrite(struct nvdimm *nvdimm, unsigned int keyid)* query. */ get_device (dev); -queue_delayed_work (system_wq, &nvdimm->dwork,0 ); +queue_delayed_work (system_percpu_wq, &nvdimm->dwork,0 ); }return rc;
@@ -460,7 +460,7 @@ static void __nvdimm_security_overwrite_query(struct nvdimm *nvdimm)/* setup delayed work again */ tmo +=10 ; -queue_delayed_work (system_wq, &nvdimm->dwork, tmo *HZ ); +queue_delayed_work (system_percpu_wq, &nvdimm->dwork, tmo *HZ ); nvdimm->sec.overwrite_tmo =min (15U *60U , tmo);return ; }
drivers/nvme/target/admin-cmd.c +1 -1
@@ -1613,7 +1613,7 @@ void nvmet_execute_keep_alive(struct nvmet_req *req)pr_debug ("ctrl %d update keep-alive timer for %d secs\n" , ctrl->cntlid, ctrl->kato); -mod_delayed_work (system_wq, &ctrl->ka_work, ctrl->kato *HZ ); +mod_delayed_work (system_percpu_wq, &ctrl->ka_work, ctrl->kato *HZ ); out:nvmet_req_complete (req, status); }
drivers/nvme/target/fabrics-cmd-auth.c +1 -1
@@ -390,7 +390,7 @@ void nvmet_execute_auth_send(struct nvmet_req *req) req->sq->dhchap_step != NVME_AUTH_DHCHAP_MESSAGE_FAILURE2) {unsigned long auth_expire_secs = ctrl->kato ? ctrl->kato :120 ; -mod_delayed_work (system_wq, &req->sq->auth_expired_work, +mod_delayed_work (system_percpu_wq, &req->sq->auth_expired_work, auth_expire_secs *HZ ); goto complete; }
drivers/pci/endpoint/pci-ep-cfs.c +1 -1
@@ -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;
drivers/phy/allwinner/phy-sun4i-usb.c +7 -7
@@ -359,7 +359,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)/* Force ISCR and cable state updates */ data->id_det =-1 ; data->vbus_det =-1 ; -queue_delayed_work (system_wq, &data->detect,0 ); +queue_delayed_work (system_percpu_wq, &data->detect,0 ); }return 0 ;
@@ -482,7 +482,7 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)/* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ if (phy->index ==0 &&sun4i_usb_phy0_poll (data)) -mod_delayed_work (system_wq, &data->detect,DEBOUNCE_TIME ); +mod_delayed_work (system_percpu_wq, &data->detect,DEBOUNCE_TIME );return 0 ; }
@@ -503,7 +503,7 @@ static int sun4i_usb_phy_power_off(struct phy *_phy)* Vbus gpio to not trigger an edge irq on Vbus off, so force a rescan. */ if (phy->index ==0 && !sun4i_usb_phy0_poll (data)) -mod_delayed_work (system_wq, &data->detect,POLL_TIME ); +mod_delayed_work (system_percpu_wq, &data->detect,POLL_TIME );return 0 ; }
@@ -542,7 +542,7 @@ static int sun4i_usb_phy_set_mode(struct phy *_phy, data->id_det =-1 ;/* Force reprocessing of id */ data->force_session_end = true; -queue_delayed_work (system_wq, &data->detect,0 ); +queue_delayed_work (system_percpu_wq, &data->detect,0 );return 0 ; }
@@ -654,7 +654,7 @@ static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)extcon_set_state_sync (data->extcon,EXTCON_USB , vbus_det);if (sun4i_usb_phy0_poll (data)) -queue_delayed_work (system_wq, &data->detect,POLL_TIME ); +queue_delayed_work (system_percpu_wq, &data->detect,POLL_TIME ); }static irqreturn_t sun4i_usb_phy0_id_vbus_det_irq (int irq,void *dev_id)
@@ -662,7 +662,7 @@ static irqreturn_t sun4i_usb_phy0_id_vbus_det_irq(int irq, void *dev_id)struct sun4i_usb_phy_data *data = dev_id;/* vbus or id changed, let the pins settle and then scan them */ -mod_delayed_work (system_wq, &data->detect,DEBOUNCE_TIME ); +mod_delayed_work (system_percpu_wq, &data->detect,DEBOUNCE_TIME );return IRQ_HANDLED ; }
@@ -676,7 +676,7 @@ static int sun4i_usb_phy0_vbus_notify(struct notifier_block *nb,/* Properties on the vbus_power_supply changed, scan vbus_det */ if (val ==PSY_EVENT_PROP_CHANGED && psy == data->vbus_power_supply) -mod_delayed_work (system_wq, &data->detect,DEBOUNCE_TIME ); +mod_delayed_work (system_percpu_wq, &data->detect,DEBOUNCE_TIME );return NOTIFY_OK ; }
drivers/platform/cznic/turris-omnia-mcu-gpio.c +1 -1
@@ -883,7 +883,7 @@ static bool omnia_irq_read_pending_old(struct omnia_mcu *mcu,if (status &OMNIA_STS_BUTTON_PRESSED ) { mcu->button_pressed_emul = true; -mod_delayed_work (system_wq, &mcu->button_release_emul_work, +mod_delayed_work (system_percpu_wq, &mcu->button_release_emul_work,msecs_to_jiffies (FRONT_BUTTON_RELEASE_DELAY_MS )); }else if (mcu->button_pressed_emul) { status |=OMNIA_STS_BUTTON_PRESSED ;
drivers/platform/surface/aggregator/ssh_packet_layer.c +1 -1
@@ -671,7 +671,7 @@ static void ssh_ptl_timeout_reaper_mod(struct ssh_ptl *ptl, ktime_t now,/* Re-adjust / schedule reaper only if it is above resolution delta. */ if (ktime_before (aexp, ptl->rtx_timeout.expires)) { ptl->rtx_timeout.expires = expires; -mod_delayed_work (system_wq, &ptl->rtx_timeout.reaper, delta); +mod_delayed_work (system_percpu_wq, &ptl->rtx_timeout.reaper, delta); }spin_unlock (&ptl->rtx_timeout.lock);
drivers/platform/surface/aggregator/ssh_request_layer.c +1 -1
@@ -434,7 +434,7 @@ static void ssh_rtl_timeout_reaper_mod(struct ssh_rtl *rtl, ktime_t now,/* Re-adjust / schedule reaper only if it is above resolution delta. */ if (ktime_before (aexp, rtl->rtx_timeout.expires)) { rtl->rtx_timeout.expires = expires; -mod_delayed_work (system_wq, &rtl->rtx_timeout.reaper, delta); +mod_delayed_work (system_percpu_wq, &rtl->rtx_timeout.reaper, delta); }spin_unlock (&rtl->rtx_timeout.lock);
drivers/platform/x86/gpd-pocket-fan.c +2 -2
@@ -112,14 +112,14 @@ static void gpd_pocket_fan_worker(struct work_struct *work)gpd_pocket_fan_set_speed (fan, speed);/* When mostly idle (low temp/speed), slow down the poll interval. */ -queue_delayed_work (system_wq, &fan->work, +queue_delayed_work (system_percpu_wq, &fan->work,msecs_to_jiffies (4000 / (speed +1 ))); }static void gpd_pocket_fan_force_update (struct gpd_pocket_fan_data *fan) { fan->last_speed =-1 ; -mod_delayed_work (system_wq, &fan->work,0 ); +mod_delayed_work (system_percpu_wq, &fan->work,0 ); }static int gpd_pocket_fan_probe (struct platform_device *pdev)
drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c +1 -1
@@ -183,7 +183,7 @@ static void atla10_ec_external_power_changed(struct power_supply *psy)struct atla10_ec_data *data =power_supply_get_drvdata (psy);/* After charger plug in/out wait 0.5s for things to stabilize */ -mod_delayed_work (system_wq, &data->work,HZ /2 ); +mod_delayed_work (system_percpu_wq, &data->work,HZ /2 ); }static const enum power_supply_property atla10_ec_psy_props[] = {
drivers/ras/cec.c +1 -1
@@ -166,7 +166,7 @@ static void cec_mod_work(unsigned long interval)unsigned long iv; iv = interval *HZ ; -mod_delayed_work (system_wq, &cec_work,round_jiffies (iv)); +mod_delayed_work (system_percpu_wq, &cec_work,round_jiffies (iv)); }static void cec_work_fn (struct work_struct *work)
drivers/regulator/irq_helpers.c +1 -1
@@ -146,7 +146,7 @@ static void regulator_notifier_isr_work(struct work_struct *work) reschedule:if (!d->high_prio) -mod_delayed_work (system_wq, &h->isr_work, +mod_delayed_work (system_percpu_wq, &h->isr_work,msecs_to_jiffies (tmo));else mod_delayed_work(system_highpri_wq, &h->isr_work,
drivers/regulator/qcom-labibb-regulator.c +2 -2
@@ -230,7 +230,7 @@ static void qcom_labibb_ocp_recovery_worker(struct work_struct *work)return ; reschedule: -mod_delayed_work (system_wq, &vreg->ocp_recovery_work, +mod_delayed_work (system_percpu_wq, &vreg->ocp_recovery_work,msecs_to_jiffies (OCP_RECOVERY_INTERVAL_MS )); }
@@ -510,7 +510,7 @@ static void qcom_labibb_sc_recovery_worker(struct work_struct *work)* taking action is not truly urgent anymore. */ vreg->sc_count++; -mod_delayed_work (system_wq, &vreg->sc_recovery_work, +mod_delayed_work (system_percpu_wq, &vreg->sc_recovery_work,msecs_to_jiffies (SC_RECOVERY_INTERVAL_MS )); }
drivers/thunderbolt/tb.c +1 -1
@@ -2617,7 +2617,7 @@ static int tb_alloc_dp_bandwidth(struct tb_tunnel *tunnel, int *requested_up,* the 10s already expired and we should * give the reserved back to others). */ -mod_delayed_work (system_wq, &group->release_work, +mod_delayed_work (system_percpu_wq, &group->release_work,msecs_to_jiffies (TB_RELEASE_BW_TIMEOUT )); } }
drivers/usb/dwc3/gadget.c +1 -1
@@ -3888,7 +3888,7 @@ static void dwc3_gadget_endpoint_stream_event(struct dwc3_ep *dep,case DEPEVT_STREAM_NOSTREAM : dep->flags &= ~DWC3_EP_STREAM_PRIMED ;if (dep->flags &DWC3_EP_FORCE_RESTART_STREAM ) -queue_delayed_work (system_wq, &dep->nostream_work, +queue_delayed_work (system_percpu_wq, &dep->nostream_work,msecs_to_jiffies (100 ));break ; }
drivers/usb/host/xhci-dbgcap.c +4 -4
@@ -365,7 +365,7 @@ int dbc_ep_queue(struct dbc_request *req) ret =dbc_ep_do_queue (req);spin_unlock_irqrestore (&dbc->lock, flags); -mod_delayed_work (system_wq, &dbc->event_work,0 ); +mod_delayed_work (system_percpu_wq, &dbc->event_work,0 );trace_xhci_dbc_queue_request (req);
@@ -637,7 +637,7 @@ static int xhci_dbc_start(struct xhci_dbc *dbc)return ret; } -return mod_delayed_work (system_wq, &dbc->event_work, +return mod_delayed_work (system_percpu_wq, &dbc->event_work,msecs_to_jiffies (dbc->poll_interval)); }
@@ -964,7 +964,7 @@ static void xhci_dbc_handle_events(struct work_struct *work)return ; } -mod_delayed_work (system_wq, &dbc->event_work, +mod_delayed_work (system_percpu_wq, &dbc->event_work,msecs_to_jiffies (poll_interval)); }
@@ -1215,7 +1215,7 @@ static ssize_t dbc_poll_interval_ms_store(struct device *dev, dbc->poll_interval = value; -mod_delayed_work (system_wq, &dbc->event_work,0 ); +mod_delayed_work (system_percpu_wq, &dbc->event_work,0 );return size; }
drivers/usb/host/xhci-ring.c +1 -1
@@ -434,7 +434,7 @@ void xhci_ring_cmd_db(struct xhci_hcd *xhci)static bool xhci_mod_cmd_timer (struct xhci_hcd *xhci) { -return mod_delayed_work (system_wq, &xhci->cmd_timer, +return mod_delayed_work (system_percpu_wq, &xhci->cmd_timer,msecs_to_jiffies (xhci->current_cmd->timeout_ms)); }
drivers/xen/events/events_base.c +3 -3
@@ -581,7 +581,7 @@ static void lateeoi_list_add(struct irq_info *info) eoi_list);if (!elem || info->eoi_time < elem->eoi_time) {list_add (&info->eoi_list, &eoi->eoi_list); -mod_delayed_work_on (info->eoi_cpu, system_wq, +mod_delayed_work_on (info->eoi_cpu, system_percpu_wq, &eoi->delayed, delay); }else {list_for_each_entry_reverse (elem, &eoi->eoi_list, eoi_list) {
@@ -666,7 +666,7 @@ static void xen_irq_lateeoi_worker(struct work_struct *work)break ;if (now < info->eoi_time) { -mod_delayed_work_on (info->eoi_cpu, system_wq, +mod_delayed_work_on (info->eoi_cpu, system_percpu_wq, &eoi->delayed, info->eoi_time - now);break ;
@@ -782,7 +782,7 @@ static void xen_free_irq(struct irq_info *info)WARN_ON (info->refcnt >0 ); -queue_rcu_work (system_wq, &info->rwork); +queue_rcu_work (system_percpu_wq, &info->rwork); }/* Not called for lateeoi events. */
Signature · 1 line
2.51.0
PATCH 3/3 drivers: WQ_PERCPU added to alloc_workqueue users
In reply to Marco CrivellariCurrently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use 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 consistentcy cannot be addressed without refactoring the API.
alloc_workqueue() treats all queues as per-CPU by default, while unbound workqueues must opt-in via WQ_UNBOUND.
This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they’re needed and reducing noise when CPUs are isolated.
This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they’re needed and reducing noise when CPUs are isolated.
This patch adds a new WQ_PERCPU flag to explicitly request the use of the per-CPU behavior. Both flags coexist for one release cycle to allow callers to transition their calls.
Once migration is complete, WQ_UNBOUND can be removed and unbound will become the implicit default.
With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND must now use WQ_PERCPU.
All existing users have been updated accordingly.
--- drivers/acpi/ec.c | 3 ++- drivers/acpi/osl.c | 4 ++-- drivers/acpi/thermal.c | 3 ++- drivers/ata/libata-sff.c | 3 ++- drivers/base/core.c | 2 +- drivers/bus/mhi/ep/main.c | 2 +- drivers/char/tpm/tpm-dev-common.c | 3 ++- drivers/char/xillybus/xillybus_core.c | 2 +- drivers/char/xillybus/xillyusb.c | 4 ++-- drivers/cpufreq/tegra194-cpufreq.c | 3 ++- drivers/crypto/atmel-i2c.c | 2 +- drivers/crypto/cavium/nitrox/nitrox_mbx.c | 2 +- drivers/crypto/intel/qat/qat_common/adf_aer.c | 4 ++-- drivers/crypto/intel/qat/qat_common/adf_isr.c | 3 ++- drivers/crypto/intel/qat/qat_common/adf_sriov.c | 3 ++- drivers/crypto/intel/qat/qat_common/adf_vf_isr.c | 3 ++- drivers/firewire/core-transaction.c | 3 ++- drivers/firewire/ohci.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++- drivers/gpu/drm/bridge/analogix/anx7625.c | 3 ++- .../gpu/drm/i915/display/intel_display_driver.c | 3 ++- drivers/gpu/drm/i915/i915_driver.c | 3 ++- drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 2 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_sched.c | 3 ++- drivers/gpu/drm/radeon/radeon_display.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 4 ++-- drivers/gpu/drm/xe/xe_ggtt.c | 2 +- drivers/gpu/drm/xe/xe_hw_engine_group.c | 3 ++- drivers/gpu/drm/xe/xe_sriov.c | 2 +- drivers/greybus/operation.c | 2 +- drivers/hid/hid-nintendo.c | 3 ++- drivers/hv/mshv_eventfd.c | 2 +- drivers/i3c/master.c | 2 +- drivers/infiniband/core/cm.c | 2 +- drivers/infiniband/core/device.c | 4 ++-- drivers/infiniband/hw/hfi1/init.c | 3 +-- drivers/infiniband/hw/hfi1/opfn.c | 3 +-- drivers/infiniband/hw/mlx4/cm.c | 2 +- drivers/infiniband/sw/rdmavt/cq.c | 3 ++- drivers/infiniband/ulp/iser/iscsi_iser.c | 2 +- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- drivers/input/mouse/psmouse-smbus.c | 2 +- drivers/isdn/capi/kcapi.c | 2 +- drivers/md/bcache/btree.c | 3 ++- drivers/md/bcache/super.c | 10 ++++++---- drivers/md/bcache/writeback.c | 2 +- drivers/md/dm-bufio.c | 3 ++- drivers/md/dm-cache-target.c | 3 ++- drivers/md/dm-clone-target.c | 3 ++- drivers/md/dm-crypt.c | 6 ++++-- drivers/md/dm-delay.c | 4 +++- drivers/md/dm-integrity.c | 15 ++++++++++----- drivers/md/dm-kcopyd.c | 3 ++- drivers/md/dm-log-userspace-base.c | 3 ++- drivers/md/dm-mpath.c | 5 +++-- drivers/md/dm-raid1.c | 5 +++-- drivers/md/dm-snap-persistent.c | 3 ++- drivers/md/dm-stripe.c | 2 +- drivers/md/dm-verity-target.c | 4 +++- drivers/md/dm-writecache.c | 3 ++- drivers/md/dm.c | 3 ++- drivers/md/md.c | 4 ++-- drivers/media/pci/ddbridge/ddbridge-core.c | 2 +- .../media/platform/mediatek/mdp3/mtk-mdp3-core.c | 6 ++++-- drivers/message/fusion/mptbase.c | 7 +++++-- drivers/mmc/core/block.c | 3 ++- drivers/mmc/host/omap.c | 2 +- drivers/nvme/host/tcp.c | 2 ++ drivers/nvme/target/core.c | 5 +++-- drivers/nvme/target/fc.c | 6 +++--- drivers/nvme/target/tcp.c | 2 +- drivers/pci/endpoint/functions/pci-epf-mhi.c | 2 +- drivers/pci/endpoint/functions/pci-epf-ntb.c | 5 +++-- drivers/pci/endpoint/functions/pci-epf-test.c | 3 ++- drivers/pci/endpoint/functions/pci-epf-vntb.c | 5 +++-- drivers/pci/hotplug/pnv_php.c | 3 ++- drivers/pci/hotplug/shpchp_core.c | 3 ++- drivers/platform/surface/surface_acpi_notify.c | 2 +- drivers/rapidio/rio.c | 2 +- drivers/scsi/be2iscsi/be_main.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 ++- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/qedf/qedf_main.c | 15 ++++++++++----- drivers/scsi/qedi/qedi_main.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 7 ++++--- drivers/soc/fsl/qbman/qman.c | 2 +- drivers/staging/greybus/sdio.c | 2 +- drivers/target/target_core_transport.c | 4 ++-- drivers/target/target_core_xcopy.c | 2 +- drivers/target/tcm_fc/tfc_conf.c | 2 +- drivers/usb/core/hub.c | 2 +- drivers/usb/gadget/function/f_hid.c | 3 +-- drivers/usb/storage/uas.c | 2 +- drivers/usb/typec/anx7411.c | 3 +-- drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++- drivers/virtio/virtio_balloon.c | 3 ++- drivers/xen/privcmd.c | 3 ++- 109 files changed, 207 insertions(+), 142 deletions(-)
drivers/acpi/ec.c +2 -1
@@ -2273,7 +2273,8 @@ static int acpi_ec_init_workqueues(void) ec_wq =alloc_ordered_workqueue ("kec" ,0 );if (!ec_query_wq) - ec_query_wq =alloc_workqueue ("kec_query" ,0 , ec_max_queries); + ec_query_wq =alloc_workqueue ("kec_query" ,WQ_PERCPU , + ec_max_queries);if (!ec_wq || !ec_query_wq) {acpi_ec_destroy_workqueues ();
drivers/acpi/osl.c +2 -2
@@ -1694,8 +1694,8 @@ acpi_status __init acpi_os_initialize(void)acpi_status __init acpi_os_initialize1 (void ) { - kacpid_wq =alloc_workqueue ("kacpid" ,0 ,1 ); - kacpi_notify_wq =alloc_workqueue ("kacpi_notify" ,0 ,0 ); + kacpid_wq =alloc_workqueue ("kacpid" ,WQ_PERCPU ,1 ); + kacpi_notify_wq =alloc_workqueue ("kacpi_notify" ,WQ_PERCPU ,0 ); kacpi_hotplug_wq =alloc_ordered_workqueue ("kacpi_hotplug" ,0 );BUG_ON (!kacpid_wq);BUG_ON (!kacpi_notify_wq);
drivers/acpi/thermal.c +2 -1
@@ -1060,7 +1060,8 @@ static int __init acpi_thermal_init(void) } acpi_thermal_pm_queue =alloc_workqueue ("acpi_thermal_pm" , -WQ_HIGHPRI |WQ_MEM_RECLAIM ,0 ); +WQ_HIGHPRI |WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!acpi_thermal_pm_queue)return -ENODEV ;
drivers/ata/libata-sff.c +2 -1
@@ -3199,7 +3199,8 @@ void ata_sff_port_init(struct ata_port *ap)int __init ata_sff_init (void ) { - ata_sff_wq =alloc_workqueue ("ata_sff" ,WQ_MEM_RECLAIM ,WQ_MAX_ACTIVE ); + ata_sff_wq =alloc_workqueue ("ata_sff" ,WQ_MEM_RECLAIM |WQ_PERCPU , +WQ_MAX_ACTIVE );if (!ata_sff_wq)return -ENOMEM ;
drivers/base/core.c +1 -1
@@ -4115,7 +4115,7 @@ int __init devices_init(void) sysfs_dev_char_kobj =kobject_create_and_add ("char" , dev_kobj);if (!sysfs_dev_char_kobj) goto char_kobj_err; - device_link_wq =alloc_workqueue ("device_link_wq" ,0 ,0 ); + device_link_wq =alloc_workqueue ("device_link_wq" ,WQ_PERCPU ,0 );if (!device_link_wq) goto wq_err;
drivers/bus/mhi/ep/main.c +1 -1
@@ -1507,7 +1507,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,INIT_WORK (&mhi_cntrl->cmd_ring_work, mhi_ep_cmd_ring_worker);INIT_WORK (&mhi_cntrl->ch_ring_work, mhi_ep_ch_ring_worker); - mhi_cntrl->wq =alloc_workqueue ("mhi_ep_wq" ,0 ,0 ); + mhi_cntrl->wq =alloc_workqueue ("mhi_ep_wq" ,WQ_PERCPU ,0 );if (!mhi_cntrl->wq) { ret = -ENOMEM ; goto err_destroy_ring_item_cache;
drivers/char/tpm/tpm-dev-common.c +2 -1
@@ -275,7 +275,8 @@ void tpm_common_release(struct file *file, struct file_priv *priv)int __init tpm_dev_common_init (void ) { - tpm_dev_wq =alloc_workqueue ("tpm_dev_wq" ,WQ_MEM_RECLAIM ,0 ); + tpm_dev_wq =alloc_workqueue ("tpm_dev_wq" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );return !tpm_dev_wq ? -ENOMEM :0 ; }
drivers/char/xillybus/xillybus_core.c +1 -1
@@ -1974,7 +1974,7 @@ EXPORT_SYMBOL(xillybus_endpoint_remove);static int __init xillybus_init (void ) { - xillybus_wq =alloc_workqueue (xillyname,0 ,0 ); + xillybus_wq =alloc_workqueue (xillyname,WQ_PERCPU ,0 );if (!xillybus_wq)return -ENOMEM ;
drivers/char/xillybus/xillyusb.c +2 -2
@@ -2163,7 +2163,7 @@ static int xillyusb_probe(struct usb_interface *interface,spin_lock_init (&xdev->error_lock); xdev->in_counter =0 ; xdev->in_bytes_left =0 ; - xdev->workq =alloc_workqueue (xillyname,WQ_HIGHPRI ,0 ); + xdev->workq =alloc_workqueue (xillyname,WQ_HIGHPRI |WQ_PERCPU ,0 );if (!xdev->workq) {dev_err (&interface->dev,"Failed to allocate work queue\n" );
@@ -2275,7 +2275,7 @@ static int __init xillyusb_init(void) {int rc =0 ; - wakeup_wq =alloc_workqueue (xillyname,0 ,0 ); + wakeup_wq =alloc_workqueue (xillyname,WQ_PERCPU ,0 );if (!wakeup_wq)return -ENOMEM ;
drivers/cpufreq/tegra194-cpufreq.c +2 -1
@@ -750,7 +750,8 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev)if (IS_ERR (bpmp))return PTR_ERR (bpmp); - read_counters_wq =alloc_workqueue ("read_counters_wq" , __WQ_LEGACY,1 ); + read_counters_wq =alloc_workqueue ("read_counters_wq" , + __WQ_LEGACY |WQ_PERCPU ,1 );if (!read_counters_wq) {dev_err (&pdev->dev,"fail to create_workqueue\n" ); err = -EINVAL ;
drivers/crypto/atmel-i2c.c +1 -1
@@ -402,7 +402,7 @@ EXPORT_SYMBOL(atmel_i2c_probe);static int __init atmel_i2c_init (void ) { - atmel_wq =alloc_workqueue ("atmel_wq" ,0 ,0 ); + atmel_wq =alloc_workqueue ("atmel_wq" ,WQ_PERCPU ,0 );return atmel_wq ?0 : -ENOMEM ; }
drivers/crypto/cavium/nitrox/nitrox_mbx.c +1 -1
@@ -192,7 +192,7 @@ int nitrox_mbox_init(struct nitrox_device *ndev) }/* allocate pf2vf response workqueue */ - ndev->iov.pf2vf_wq =alloc_workqueue ("nitrox_pf2vf" ,0 ,0 ); + ndev->iov.pf2vf_wq =alloc_workqueue ("nitrox_pf2vf" ,WQ_PERCPU ,0 );if (!ndev->iov.pf2vf_wq) {kfree (ndev->iov.vfdev); ndev->iov.vfdev =NULL ;
drivers/crypto/intel/qat/qat_common/adf_aer.c +2 -2
@@ -276,11 +276,11 @@ int adf_notify_fatal_error(struct adf_accel_dev *accel_dev)int adf_init_aer (void ) { device_reset_wq =alloc_workqueue ("qat_device_reset_wq" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!device_reset_wq)return -EFAULT ; - device_sriov_wq =alloc_workqueue ("qat_device_sriov_wq" ,0 ,0 ); + device_sriov_wq =alloc_workqueue ("qat_device_sriov_wq" ,WQ_PERCPU ,0 );if (!device_sriov_wq) {destroy_workqueue (device_reset_wq); device_reset_wq =NULL ;
drivers/crypto/intel/qat/qat_common/adf_isr.c +2 -1
@@ -384,7 +384,8 @@ EXPORT_SYMBOL_GPL(adf_isr_resource_alloc);*/ int __init adf_init_misc_wq (void ) { - adf_misc_wq =alloc_workqueue ("qat_misc_wq" ,WQ_MEM_RECLAIM ,0 ); + adf_misc_wq =alloc_workqueue ("qat_misc_wq" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );return !adf_misc_wq ? -ENOMEM :0 ; }
drivers/crypto/intel/qat/qat_common/adf_sriov.c +2 -1
@@ -300,7 +300,8 @@ EXPORT_SYMBOL_GPL(adf_sriov_configure);int __init adf_init_pf_wq (void ) {/* Workqueue for PF2VF responses */ - pf2vf_resp_wq =alloc_workqueue ("qat_pf2vf_resp_wq" ,WQ_MEM_RECLAIM ,0 ); + pf2vf_resp_wq =alloc_workqueue ("qat_pf2vf_resp_wq" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );return !pf2vf_resp_wq ? -ENOMEM :0 ; }
drivers/crypto/intel/qat/qat_common/adf_vf_isr.c +2 -1
@@ -299,7 +299,8 @@ EXPORT_SYMBOL_GPL(adf_flush_vf_wq);*/ int __init adf_init_vf_wq (void ) { - adf_vf_stop_wq =alloc_workqueue ("adf_vf_stop_wq" ,WQ_MEM_RECLAIM ,0 ); + adf_vf_stop_wq =alloc_workqueue ("adf_vf_stop_wq" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );return !adf_vf_stop_wq ? -EFAULT :0 ; }
drivers/firewire/core-transaction.c +2 -1
@@ -1327,7 +1327,8 @@ static int __init fw_core_init(void) {int ret; - fw_workqueue =alloc_workqueue ("firewire" ,WQ_MEM_RECLAIM ,0 ); + fw_workqueue =alloc_workqueue ("firewire" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!fw_workqueue)return -ENOMEM ;
drivers/firewire/ohci.c +2 -1
@@ -3941,7 +3941,8 @@ static struct pci_driver fw_ohci_pci_driver = {static int __init fw_ohci_init (void ) { - selfid_workqueue =alloc_workqueue (KBUILD_MODNAME ,WQ_MEM_RECLAIM ,0 ); + selfid_workqueue =alloc_workqueue (KBUILD_MODNAME , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!selfid_workqueue)return -ENOMEM ;
drivers/gpu/drm/amd/amdkfd/kfd_process.c +2 -1
@@ -690,7 +690,8 @@ void kfd_procfs_del_queue(struct queue *q)int kfd_process_create_wq (void ) {if (!kfd_process_wq) - kfd_process_wq =alloc_workqueue ("kfd_process_wq" ,0 ,0 ); + kfd_process_wq =alloc_workqueue ("kfd_process_wq" ,WQ_PERCPU , +0 );if (!kfd_restore_wq) kfd_restore_wq =alloc_ordered_workqueue ("kfd_restore_wq" ,WQ_FREEZABLE );
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -1
@@ -2659,7 +2659,8 @@ static int anx7625_i2c_probe(struct i2c_client *client)if (platform->pdata.intp_irq) {INIT_WORK (&platform->work, anx7625_work_func); platform->workqueue =alloc_workqueue ("anx7625_work" , -WQ_FREEZABLE |WQ_MEM_RECLAIM ,1 ); +WQ_FREEZABLE |WQ_MEM_RECLAIM |WQ_PERCPU , +1 );if (!platform->workqueue) {DRM_DEV_ERROR (dev,"fail to create work queue\n" ); ret = -ENOMEM ;
drivers/gpu/drm/i915/display/intel_display_driver.c +2 -1
@@ -243,7 +243,8 @@ int intel_display_driver_probe_noirq(struct intel_display *display) display->wq.modeset =alloc_ordered_workqueue ("i915_modeset" ,0 ); display->wq.flip =alloc_workqueue ("i915_flip" ,WQ_HIGHPRI |WQ_UNBOUND ,WQ_UNBOUND_MAX_ACTIVE ); - display->wq.cleanup =alloc_workqueue ("i915_cleanup" ,WQ_HIGHPRI ,0 ); + display->wq.cleanup =alloc_workqueue ("i915_cleanup" ,WQ_HIGHPRI | +WQ_PERCPU ,0 );intel_mode_config_init (display);
drivers/gpu/drm/i915/i915_driver.c +2 -1
@@ -144,7 +144,8 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)* to be scheduled on the system_percpu_wq before moving to a driver * instance due deprecation of flush_scheduled_work(). */ - dev_priv->unordered_wq =alloc_workqueue ("i915-unordered" ,0 ,0 ); + dev_priv->unordered_wq =alloc_workqueue ("i915-unordered" ,WQ_PERCPU , +0 );if (dev_priv->unordered_wq ==NULL ) goto out_free_dp_wq;
drivers/gpu/drm/i915/selftests/i915_sw_fence.c +1 -1
@@ -526,7 +526,7 @@ static int test_ipc(void *arg)struct workqueue_struct *wq;int ret =0 ; - wq =alloc_workqueue ("i1915-selftest" ,0 ,0 ); + wq =alloc_workqueue ("i1915-selftest" ,WQ_PERCPU ,0 );if (wq ==NULL )return -ENOMEM ;
drivers/gpu/drm/i915/selftests/mock_gem_device.c +1 -1
@@ -214,7 +214,7 @@ struct drm_i915_private *mock_gem_device(void)if (!i915->wq) goto err_drv; - i915->unordered_wq =alloc_workqueue ("mock-unordered" ,0 ,0 ); + i915->unordered_wq =alloc_workqueue ("mock-unordered" ,WQ_PERCPU ,0 );if (!i915->unordered_wq) goto err_wq;
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
@@ -626,7 +626,7 @@ nouveau_drm_device_init(struct nouveau_drm *drm)struct drm_device *dev = drm->dev;int ret; - drm->sched_wq =alloc_workqueue ("nouveau_sched_wq_shared" ,0 , + drm->sched_wq =alloc_workqueue ("nouveau_sched_wq_shared" ,WQ_PERCPU ,WQ_MAX_ACTIVE );if (!drm->sched_wq)return -ENOMEM ;
drivers/gpu/drm/nouveau/nouveau_sched.c +2 -1
@@ -415,7 +415,8 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,int ret;if (!wq) { - wq =alloc_workqueue ("nouveau_sched_wq_%d" ,0 ,WQ_MAX_ACTIVE , + wq =alloc_workqueue ("nouveau_sched_wq_%d" ,WQ_PERCPU , +WQ_MAX_ACTIVE , current->pid);if (!wq)return -ENOMEM ;
drivers/gpu/drm/radeon/radeon_display.c +2 -1
@@ -687,7 +687,8 @@ static void radeon_crtc_init(struct drm_device *dev, int index)if (radeon_crtc ==NULL )return ; - radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI ,0 ); + radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" , +WQ_HIGHPRI |WQ_PERCPU ,0 );if (!radeon_crtc->flip_queue) {kfree (radeon_crtc);return ;
drivers/gpu/drm/xe/xe_device.c +2 -2
@@ -475,8 +475,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev, xe->preempt_fence_wq =alloc_ordered_workqueue ("xe-preempt-fence-wq" ,WQ_MEM_RECLAIM ); xe->ordered_wq =alloc_ordered_workqueue ("xe-ordered-wq" ,0 ); - xe->unordered_wq =alloc_workqueue ("xe-unordered-wq" ,0 ,0 ); - xe->destroy_wq =alloc_workqueue ("xe-destroy-wq" ,0 ,0 ); + xe->unordered_wq =alloc_workqueue ("xe-unordered-wq" ,WQ_PERCPU ,0 ); + xe->destroy_wq =alloc_workqueue ("xe-destroy-wq" ,WQ_PERCPU ,0 );if (!xe->ordered_wq || !xe->unordered_wq || !xe->preempt_fence_wq || !xe->destroy_wq) {/*
drivers/gpu/drm/xe/xe_ggtt.c +1 -1
@@ -246,7 +246,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)else ggtt->pt_ops = &xelp_pt_ops; - ggtt->wq =alloc_workqueue ("xe-ggtt-wq" ,0 ,WQ_MEM_RECLAIM ); + ggtt->wq =alloc_workqueue ("xe-ggtt-wq" ,WQ_PERCPU ,WQ_MEM_RECLAIM );drm_mm_init (&ggtt->mm,xe_wopcm_size (xe), ggtt->size -xe_wopcm_size (xe));
drivers/gpu/drm/xe/xe_hw_engine_group.c +2 -1
@@ -57,7 +57,8 @@ hw_engine_group_alloc(struct xe_device *xe)if (!group)return ERR_PTR (-ENOMEM ); - group->resume_wq =alloc_workqueue ("xe-resume-lr-jobs-wq" ,0 ,0 ); + group->resume_wq =alloc_workqueue ("xe-resume-lr-jobs-wq" ,WQ_PERCPU , +0 );if (!group->resume_wq)return ERR_PTR (-ENOMEM );
drivers/gpu/drm/xe/xe_sriov.c +1 -1
@@ -119,7 +119,7 @@ int xe_sriov_init(struct xe_device *xe)xe_sriov_vf_init_early (xe);xe_assert (xe, !xe->sriov.wq); - xe->sriov.wq =alloc_workqueue ("xe-sriov-wq" ,0 ,0 ); + xe->sriov.wq =alloc_workqueue ("xe-sriov-wq" ,WQ_PERCPU ,0 );if (!xe->sriov.wq)return -ENOMEM ;
drivers/greybus/operation.c +1 -1
@@ -1237,7 +1237,7 @@ int __init gb_operation_init(void) goto err_destroy_message_cache; gb_operation_completion_wq =alloc_workqueue ("greybus_completion" , -0 ,0 ); +WQ_PERCPU ,0 );if (!gb_operation_completion_wq) goto err_destroy_operation_cache;
drivers/hid/hid-nintendo.c +2 -1
@@ -2647,7 +2647,8 @@ static int nintendo_hid_probe(struct hid_device *hdev,init_waitqueue_head (&ctlr->wait);spin_lock_init (&ctlr->lock); ctlr->rumble_queue =alloc_workqueue ("hid-nintendo-rumble_wq" , -WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 ); +WQ_FREEZABLE |WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!ctlr->rumble_queue) { ret = -ENOMEM ; goto err;
drivers/hv/mshv_eventfd.c +1 -1
@@ -592,7 +592,7 @@ static void mshv_irqfd_release(struct mshv_partition *pt)int mshv_irqfd_wq_init (void ) { - irqfd_cleanup_wq =alloc_workqueue ("mshv-irqfd-cleanup" ,0 ,0 ); + irqfd_cleanup_wq =alloc_workqueue ("mshv-irqfd-cleanup" ,WQ_PERCPU ,0 );if (!irqfd_cleanup_wq)return -ENOMEM ;
drivers/i3c/master.c +1 -1
@@ -2851,7 +2851,7 @@ int i3c_master_register(struct i3c_master_controller *master,if (ret) goto err_put_dev; - master->wq =alloc_workqueue ("%s" ,0 ,0 ,dev_name (parent)); + master->wq =alloc_workqueue ("%s" ,WQ_PERCPU ,0 ,dev_name (parent));if (!master->wq) { ret = -ENOMEM ; goto err_put_dev;
drivers/infiniband/core/cm.c +1 -1
@@ -4521,7 +4521,7 @@ static int __init ib_cm_init(void)get_random_bytes (&cm.random_id_operand,sizeof cm.random_id_operand);INIT_LIST_HEAD (&cm.timewait_list); - cm.wq =alloc_workqueue ("ib_cm" ,0 ,1 ); + cm.wq =alloc_workqueue ("ib_cm" ,WQ_PERCPU ,1 );if (!cm.wq) { ret = -ENOMEM ; goto error2;
drivers/infiniband/core/device.c +2 -2
@@ -2976,7 +2976,7 @@ static int __init ib_core_init(void) {int ret = -ENOMEM ; - ib_wq =alloc_workqueue ("infiniband" ,0 ,0 ); + ib_wq =alloc_workqueue ("infiniband" ,WQ_PERCPU ,0 );if (!ib_wq)return -ENOMEM ;
@@ -2986,7 +2986,7 @@ static int __init ib_core_init(void) goto err; ib_comp_wq =alloc_workqueue ("ib-comp-wq" , -WQ_HIGHPRI |WQ_MEM_RECLAIM |WQ_SYSFS ,0 ); +WQ_HIGHPRI |WQ_MEM_RECLAIM |WQ_SYSFS |WQ_PERCPU ,0 );if (!ib_comp_wq) goto err_unbound;
drivers/infiniband/hw/hfi1/init.c +1 -2
@@ -745,8 +745,7 @@ static int create_workqueues(struct hfi1_devdata *dd) ppd->hfi1_wq =alloc_workqueue ("hfi%d_%d" , -WQ_SYSFS |WQ_HIGHPRI |WQ_CPU_INTENSIVE | -WQ_MEM_RECLAIM , +WQ_SYSFS |WQ_HIGHPRI |WQ_CPU_INTENSIVE |WQ_MEM_RECLAIM |WQ_PERCPU ,HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES , dd->unit, pidx);if (!ppd->hfi1_wq)
drivers/infiniband/hw/hfi1/opfn.c +1 -2
@@ -305,8 +305,7 @@ void opfn_trigger_conn_request(struct rvt_qp *qp, u32 bth1)int opfn_init (void ) { opfn_wq =alloc_workqueue ("hfi_opfn" , -WQ_SYSFS |WQ_HIGHPRI |WQ_CPU_INTENSIVE | -WQ_MEM_RECLAIM , +WQ_SYSFS |WQ_HIGHPRI |WQ_CPU_INTENSIVE |WQ_MEM_RECLAIM |WQ_PERCPU ,HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES );if (!opfn_wq)return -ENOMEM ;
drivers/infiniband/hw/mlx4/cm.c +1 -1
@@ -591,7 +591,7 @@ void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave)int mlx4_ib_cm_init (void ) { - cm_wq =alloc_workqueue ("mlx4_ib_cm" ,0 ,0 ); + cm_wq =alloc_workqueue ("mlx4_ib_cm" ,WQ_PERCPU ,0 );if (!cm_wq)return -ENOMEM ;
drivers/infiniband/sw/rdmavt/cq.c +2 -1
@@ -518,7 +518,8 @@ int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)*/ int rvt_driver_cq_init (void ) { - comp_vector_wq =alloc_workqueue ("%s" ,WQ_HIGHPRI |WQ_CPU_INTENSIVE , + comp_vector_wq =alloc_workqueue ("%s" , +WQ_HIGHPRI |WQ_CPU_INTENSIVE |WQ_PERCPU ,0 ,"rdmavt_cq" );if (!comp_vector_wq)return -ENOMEM ;
drivers/infiniband/ulp/iser/iscsi_iser.c +1 -1
@@ -1033,7 +1033,7 @@ static int __init iser_init(void)mutex_init (&ig.connlist_mutex);INIT_LIST_HEAD (&ig.connlist); - release_wq =alloc_workqueue ("release workqueue" ,0 ,0 ); + release_wq =alloc_workqueue ("release workqueue" ,WQ_PERCPU ,0 );if (!release_wq) {iser_err ("failed to allocate release workqueue\n" ); err = -ENOMEM ;
drivers/infiniband/ulp/isert/ib_isert.c +1 -1
@@ -2613,7 +2613,7 @@ static struct iscsit_transport iser_target_transport = {static int __init isert_init (void ) { - isert_login_wq =alloc_workqueue ("isert_login_wq" ,0 ,0 ); + isert_login_wq =alloc_workqueue ("isert_login_wq" ,WQ_PERCPU ,0 );if (!isert_login_wq) {isert_err ("Unable to allocate isert_login_wq\n" );return -ENOMEM ;
drivers/infiniband/ulp/rtrs/rtrs-clt.c +1 -1
@@ -3187,7 +3187,7 @@ static int __init rtrs_client_init(void)pr_err ("Failed to create rtrs-client dev class\n" );return ret; } - rtrs_wq =alloc_workqueue ("rtrs_client_wq" ,0 ,0 ); + rtrs_wq =alloc_workqueue ("rtrs_client_wq" ,WQ_PERCPU ,0 );if (!rtrs_wq) {class_unregister (&rtrs_clt_dev_class);return -ENOMEM ;
drivers/infiniband/ulp/rtrs/rtrs-srv.c +1 -1
@@ -2321,7 +2321,7 @@ static int __init rtrs_server_init(void)if (err) goto out_err; - rtrs_wq =alloc_workqueue ("rtrs_server_wq" ,0 ,0 ); + rtrs_wq =alloc_workqueue ("rtrs_server_wq" ,WQ_PERCPU ,0 );if (!rtrs_wq) { err = -ENOMEM ; goto out_dev_class;
drivers/input/mouse/psmouse-smbus.c +1 -1
@@ -299,7 +299,7 @@ int __init psmouse_smbus_module_init(void) {int error; - psmouse_smbus_wq =alloc_workqueue ("psmouse-smbus" ,0 ,0 ); + psmouse_smbus_wq =alloc_workqueue ("psmouse-smbus" ,WQ_PERCPU ,0 );if (!psmouse_smbus_wq)return -ENOMEM ;
drivers/isdn/capi/kcapi.c +1 -1
@@ -907,7 +907,7 @@ int __init kcapi_init(void) {int err; - kcapi_wq =alloc_workqueue ("kcapi" ,0 ,0 ); + kcapi_wq =alloc_workqueue ("kcapi" ,WQ_PERCPU ,0 );if (!kcapi_wq)return -ENOMEM ;
drivers/md/bcache/btree.c +2 -1
@@ -2836,7 +2836,8 @@ void bch_btree_exit(void)int __init bch_btree_init (void ) { - btree_io_wq =alloc_workqueue ("bch_btree_io" ,WQ_MEM_RECLAIM ,0 ); + btree_io_wq =alloc_workqueue ("bch_btree_io" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!btree_io_wq)return -ENOMEM ;
drivers/md/bcache/super.c +6 -4
@@ -1933,7 +1933,8 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)if (!c->uuids) goto err; - c->moving_gc_wq =alloc_workqueue ("bcache_gc" ,WQ_MEM_RECLAIM ,0 ); + c->moving_gc_wq =alloc_workqueue ("bcache_gc" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!c->moving_gc_wq) goto err;
@@ -2867,7 +2868,7 @@ static int __init bcache_init(void)if (bch_btree_init ()) goto err; - bcache_wq =alloc_workqueue ("bcache" ,WQ_MEM_RECLAIM ,0 ); + bcache_wq =alloc_workqueue ("bcache" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!bcache_wq) goto err;
@@ -2880,11 +2881,12 @@ static int __init bcache_init(void)* * We still want to user our own queue to not congest the `system_percpu_wq`. */ - bch_flush_wq =alloc_workqueue ("bch_flush" ,0 ,0 ); + bch_flush_wq =alloc_workqueue ("bch_flush" ,WQ_PERCPU ,0 );if (!bch_flush_wq) goto err; - bch_journal_wq =alloc_workqueue ("bch_journal" ,WQ_MEM_RECLAIM ,0 ); + bch_journal_wq =alloc_workqueue ("bch_journal" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!bch_journal_wq) goto err;
drivers/md/bcache/writeback.c +1 -1
@@ -1079,7 +1079,7 @@ void bch_cached_dev_writeback_init(struct cached_dev *dc)int bch_cached_dev_writeback_start (struct cached_dev *dc) { dc->writeback_write_wq =alloc_workqueue ("bcache_writeback_wq" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!dc->writeback_write_wq)return -ENOMEM ;
drivers/md/dm-bufio.c +2 -1
@@ -2933,7 +2933,8 @@ static int __init dm_bufio_init(void)__cache_size_refresh ();mutex_unlock (&dm_bufio_clients_lock); - dm_bufio_wq =alloc_workqueue ("dm_bufio_cache" ,WQ_MEM_RECLAIM ,0 ); + dm_bufio_wq =alloc_workqueue ("dm_bufio_cache" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!dm_bufio_wq)return -ENOMEM ;
drivers/md/dm-cache-target.c +2 -1
@@ -2533,7 +2533,8 @@ static int cache_create(struct cache_args *ca, struct cache **result) goto bad; } - cache->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX ,WQ_MEM_RECLAIM ,0 ); + cache->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!cache->wq) { *error ="could not create workqueue for metadata object" ; goto bad;
drivers/md/dm-clone-target.c +2 -1
@@ -1877,7 +1877,8 @@ static int clone_ctr(struct dm_target *ti, unsigned int argc, char **argv) clone->hydration_offset =0 ;atomic_set (&clone->hydrations_in_flight,0 ); - clone->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX ,WQ_MEM_RECLAIM ,0 ); + clone->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!clone->wq) { ti->error ="Failed to allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-crypt.c +4 -2
@@ -3420,7 +3420,9 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)if (test_bit (DM_CRYPT_HIGH_PRIORITY , &cc->flags)) common_wq_flags |=WQ_HIGHPRI ; - cc->io_queue =alloc_workqueue ("kcryptd_io-%s-%d" , common_wq_flags,1 , devname, wq_id); + cc->io_queue =alloc_workqueue ("kcryptd_io-%s-%d" , + common_wq_flags |WQ_PERCPU ,1 , + devname, wq_id);if (!cc->io_queue) { ti->error ="Couldn't create kcryptd io queue" ; goto bad;
@@ -3428,7 +3430,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)if (test_bit (DM_CRYPT_SAME_CPU , &cc->flags)) { cc->crypt_queue =alloc_workqueue ("kcryptd-%s-%d" , - common_wq_flags |WQ_CPU_INTENSIVE , + common_wq_flags |WQ_CPU_INTENSIVE |WQ_PERCPU ,1 , devname, wq_id); }else {/*
drivers/md/dm-delay.c +3 -1
@@ -279,7 +279,9 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv) }else {timer_setup (&dc->delay_timer, handle_delayed_timer,0 );INIT_WORK (&dc->flush_expired_bios, flush_expired_bios); - dc->kdelayd_wq =alloc_workqueue ("kdelayd" ,WQ_MEM_RECLAIM ,0 ); + dc->kdelayd_wq =alloc_workqueue ("kdelayd" , +WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!dc->kdelayd_wq) { ret = -EINVAL ;DMERR ("Couldn't start kdelayd" );
drivers/md/dm-integrity.c +10 -5
@@ -4818,7 +4818,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv } ic->metadata_wq =alloc_workqueue ("dm-integrity-metadata" , -WQ_MEM_RECLAIM ,METADATA_WORKQUEUE_MAX_ACTIVE ); +WQ_MEM_RECLAIM |WQ_PERCPU , +METADATA_WORKQUEUE_MAX_ACTIVE );if (!ic->metadata_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -4836,7 +4837,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv goto bad; } - ic->offload_wq =alloc_workqueue ("dm-integrity-offload" ,WQ_MEM_RECLAIM , + ic->offload_wq =alloc_workqueue ("dm-integrity-offload" , +WQ_MEM_RECLAIM |WQ_PERCPU ,METADATA_WORKQUEUE_MAX_ACTIVE );if (!ic->offload_wq) { ti->error ="Cannot allocate workqueue" ;
@@ -4844,7 +4846,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv goto bad; } - ic->commit_wq =alloc_workqueue ("dm-integrity-commit" ,WQ_MEM_RECLAIM ,1 ); + ic->commit_wq =alloc_workqueue ("dm-integrity-commit" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->commit_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -4853,7 +4856,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argvINIT_WORK (&ic->commit_work, integrity_commit);if (ic->mode =='J' || ic->mode =='B' ) { - ic->writer_wq =alloc_workqueue ("dm-integrity-writer" ,WQ_MEM_RECLAIM ,1 ); + ic->writer_wq =alloc_workqueue ("dm-integrity-writer" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->writer_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -5025,7 +5029,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv }if (ic->internal_hash) { - ic->recalc_wq =alloc_workqueue ("dm-integrity-recalc" ,WQ_MEM_RECLAIM ,1 ); + ic->recalc_wq =alloc_workqueue ("dm-integrity-recalc" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->recalc_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-kcopyd.c +2 -1
@@ -934,7 +934,8 @@ struct dm_kcopyd_client *dm_kcopyd_client_create(struct dm_kcopyd_throttle *thro goto bad_slab;INIT_WORK (&kc->kcopyd_work, do_work); - kc->kcopyd_wq =alloc_workqueue ("kcopyd" ,WQ_MEM_RECLAIM ,0 ); + kc->kcopyd_wq =alloc_workqueue ("kcopyd" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!kc->kcopyd_wq) { r = -ENOMEM ; goto bad_workqueue;
drivers/md/dm-log-userspace-base.c +2 -1
@@ -299,7 +299,8 @@ static int userspace_ctr(struct dm_dirty_log *log, struct dm_target *ti, }if (lc->integrated_flush) { - lc->dmlog_wq =alloc_workqueue ("dmlogd" ,WQ_MEM_RECLAIM ,0 ); + lc->dmlog_wq =alloc_workqueue ("dmlogd" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!lc->dmlog_wq) {DMERR ("couldn't start dmlogd" ); r = -ENOMEM ;
drivers/md/dm-mpath.c +3 -2
@@ -2205,7 +2205,8 @@ static int __init dm_multipath_init(void) {int r = -ENOMEM ; - kmultipathd =alloc_workqueue ("kmpathd" ,WQ_MEM_RECLAIM ,0 ); + kmultipathd =alloc_workqueue ("kmpathd" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!kmultipathd) {DMERR ("failed to create workqueue kmpathd" ); goto bad_alloc_kmultipathd;
@@ -2224,7 +2225,7 @@ static int __init dm_multipath_init(void) goto bad_alloc_kmpath_handlerd; } - dm_mpath_wq =alloc_workqueue ("dm_mpath_wq" ,0 ,0 ); + dm_mpath_wq =alloc_workqueue ("dm_mpath_wq" ,WQ_PERCPU ,0 );if (!dm_mpath_wq) {DMERR ("failed to create workqueue dm_mpath_wq" ); goto bad_alloc_dm_mpath_wq;
drivers/md/dm-raid1.c +3 -2
@@ -1129,7 +1129,8 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->num_discard_bios =1 ; ti->per_io_data_size =sizeof (struct dm_raid1_bio_record ); - ms->kmirrord_wq =alloc_workqueue ("kmirrord" ,WQ_MEM_RECLAIM ,0 ); + ms->kmirrord_wq =alloc_workqueue ("kmirrord" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!ms->kmirrord_wq) {DMERR ("couldn't start kmirrord" ); r = -ENOMEM ;
@@ -1501,7 +1502,7 @@ static int __init dm_mirror_init(void) {int r; - dm_raid1_wq =alloc_workqueue ("dm_raid1_wq" ,0 ,0 ); + dm_raid1_wq =alloc_workqueue ("dm_raid1_wq" ,WQ_PERCPU ,0 );if (!dm_raid1_wq) {DMERR ("Failed to alloc workqueue" );return -ENOMEM ;
drivers/md/dm-snap-persistent.c +2 -1
@@ -871,7 +871,8 @@ static int persistent_ctr(struct dm_exception_store *store, char *options)atomic_set (&ps->pending_count,0 ); ps->callbacks =NULL ; - ps->metadata_wq =alloc_workqueue ("ksnaphd" ,WQ_MEM_RECLAIM ,0 ); + ps->metadata_wq =alloc_workqueue ("ksnaphd" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!ps->metadata_wq) {DMERR ("couldn't start header metadata update thread" ); r = -ENOMEM ;
drivers/md/dm-stripe.c +1 -1
@@ -485,7 +485,7 @@ int __init dm_stripe_init(void) {int r; - dm_stripe_wq =alloc_workqueue ("dm_stripe_wq" ,0 ,0 ); + dm_stripe_wq =alloc_workqueue ("dm_stripe_wq" ,WQ_PERCPU ,0 );if (!dm_stripe_wq)return -ENOMEM ; r =dm_register_target (&stripe_target);
drivers/md/dm-verity-target.c +3 -1
@@ -1665,7 +1665,9 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)* will fall-back to using it for error handling (or if the bufio cache * doesn't have required hashes). */ - v->verify_wq =alloc_workqueue ("kverityd" ,WQ_MEM_RECLAIM |WQ_HIGHPRI ,0 ); + v->verify_wq =alloc_workqueue ("kverityd" , +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 );if (!v->verify_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-writecache.c +2 -1
@@ -2276,7 +2276,8 @@ static int writecache_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad; } - wc->writeback_wq =alloc_workqueue ("writecache-writeback" ,WQ_MEM_RECLAIM ,1 ); + wc->writeback_wq =alloc_workqueue ("writecache-writeback" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!wc->writeback_wq) { r = -ENOMEM ; ti->error ="Could not allocate writeback workqueue" ;
drivers/md/dm.c +2 -1
@@ -2344,7 +2344,8 @@ static struct mapped_device *alloc_dev(int minor)format_dev_t (md->name,MKDEV (_major, minor)); - md->wq =alloc_workqueue ("kdmflush/%s" ,WQ_MEM_RECLAIM ,0 , md->name); + md->wq =alloc_workqueue ("kdmflush/%s" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 , + md->name);if (!md->wq) goto bad;
drivers/md/md.c +2 -2
@@ -9929,11 +9929,11 @@ static int __init md_init(void) {int ret = -ENOMEM ; - md_wq =alloc_workqueue ("md" ,WQ_MEM_RECLAIM ,0 ); + md_wq =alloc_workqueue ("md" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!md_wq) goto err_wq; - md_misc_wq =alloc_workqueue ("md_misc" ,0 ,0 ); + md_misc_wq =alloc_workqueue ("md_misc" ,WQ_PERCPU ,0 );if (!md_misc_wq) goto err_misc_wq;
drivers/media/pci/ddbridge/ddbridge-core.c +1 -1
@@ -3430,7 +3430,7 @@ int ddb_init_ddbridge(void)if (ddb_class_create () <0 )return -1 ; - ddb_wq =alloc_workqueue ("ddbridge" ,0 ,0 ); + ddb_wq =alloc_workqueue ("ddbridge" ,WQ_PERCPU ,0 );if (!ddb_wq)return ddb_exit_ddbridge (1 ,-1 );
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +4 -2
@@ -274,14 +274,16 @@ static int mdp_probe(struct platform_device *pdev) goto err_free_mutex; } - mdp->job_wq =alloc_workqueue (MDP_MODULE_NAME ,WQ_FREEZABLE ,0 ); + mdp->job_wq =alloc_workqueue (MDP_MODULE_NAME , +WQ_FREEZABLE |WQ_PERCPU ,0 );if (!mdp->job_wq) {dev_err (dev,"Unable to create job workqueue\n" ); ret = -ENOMEM ; goto err_deinit_comp; } - mdp->clock_wq =alloc_workqueue (MDP_MODULE_NAME "-clock" ,WQ_FREEZABLE , + mdp->clock_wq =alloc_workqueue (MDP_MODULE_NAME "-clock" , +WQ_FREEZABLE |WQ_PERCPU ,0 );if (!mdp->clock_wq) {dev_err (dev,"Unable to create clock workqueue\n" );
drivers/message/fusion/mptbase.c +5 -2
@@ -1857,7 +1857,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)INIT_DELAYED_WORK (&ioc->fault_reset_work, mpt_fault_reset_work); ioc->reset_work_q = -alloc_workqueue ("mpt_poll_%d" ,WQ_MEM_RECLAIM ,0 , ioc->id); +alloc_workqueue ("mpt_poll_%d" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 , + ioc->id);if (!ioc->reset_work_q) {printk (MYIOC_s_ERR_FMT"Insufficient memory to add adapter!\n" , ioc->name);
@@ -1984,7 +1985,9 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)INIT_LIST_HEAD (&ioc->fw_event_list);spin_lock_init (&ioc->fw_event_lock); - ioc->fw_event_q =alloc_workqueue ("mpt/%d" ,WQ_MEM_RECLAIM ,0 , ioc->id); + ioc->fw_event_q =alloc_workqueue ("mpt/%d" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 , + ioc->id);if (!ioc->fw_event_q) {printk (MYIOC_s_ERR_FMT"Insufficient memory to add adapter!\n" , ioc->name);
drivers/mmc/core/block.c +2 -1
@@ -3325,7 +3325,8 @@ static int mmc_blk_probe(struct mmc_card *card)mmc_fixup_device (card, mmc_blk_fixups); card->complete_wq =alloc_workqueue ("mmc_complete" , -WQ_MEM_RECLAIM |WQ_HIGHPRI ,0 ); +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 );if (!card->complete_wq) {pr_err ("Failed to create mmc completion workqueue" );return -ENOMEM ;
drivers/mmc/host/omap.c +1 -1
@@ -1483,7 +1483,7 @@ static int mmc_omap_probe(struct platform_device *pdev) host->nr_slots = pdata->nr_slots; host->reg_shift = (mmc_omap7xx () ?1 :2 ); - host->mmc_omap_wq =alloc_workqueue ("mmc_omap" ,0 ,0 ); + host->mmc_omap_wq =alloc_workqueue ("mmc_omap" ,WQ_PERCPU ,0 );if (!host->mmc_omap_wq) { ret = -ENOMEM ; goto err_plat_cleanup;
drivers/nvme/host/tcp.c +2 -0
@@ -3022,6 +3022,8 @@ static int __init nvme_tcp_init_module(void)if (wq_unbound) wq_flags |=WQ_UNBOUND ; +else + wq_flags |=WQ_PERCPU ; nvme_tcp_wq =alloc_workqueue ("nvme_tcp_wq" , wq_flags,0 );if (!nvme_tcp_wq)
drivers/nvme/target/core.c +3 -2
@@ -1896,12 +1896,13 @@ static int __init nvmet_init(void)if (!nvmet_bvec_cache)return -ENOMEM ; - zbd_wq =alloc_workqueue ("nvmet-zbd-wq" ,WQ_MEM_RECLAIM ,0 ); + zbd_wq =alloc_workqueue ("nvmet-zbd-wq" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!zbd_wq) goto out_destroy_bvec_cache; buffered_io_wq =alloc_workqueue ("nvmet-buffered-io-wq" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!buffered_io_wq) goto out_free_zbd_work_queue;
drivers/nvme/target/fc.c +3 -3
@@ -795,9 +795,9 @@ nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc,if (!queue)return NULL ; - queue->work_q =alloc_workqueue ("ntfc%d.%d.%d" ,0 ,0 , - assoc->tgtport->fc_target_port.port_num, - assoc->a_id, qid); + queue->work_q =alloc_workqueue ("ntfc%d.%d.%d" ,WQ_PERCPU ,0 , + assoc->tgtport->fc_target_port.port_num, + assoc->a_id, qid);if (!queue->work_q) goto out_free_queue;
drivers/nvme/target/tcp.c +1 -1
@@ -2233,7 +2233,7 @@ static int __init nvmet_tcp_init(void)int ret; nvmet_tcp_wq =alloc_workqueue ("nvmet_tcp_wq" , -WQ_MEM_RECLAIM |WQ_HIGHPRI ,0 ); +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU ,0 );if (!nvmet_tcp_wq)return -ENOMEM ;
drivers/pci/endpoint/functions/pci-epf-mhi.c +1 -1
@@ -686,7 +686,7 @@ static int pci_epf_mhi_dma_init(struct pci_epf_mhi *epf_mhi) goto err_release_tx; } - epf_mhi->dma_wq =alloc_workqueue ("pci_epf_mhi_dma_wq" ,0 ,0 ); + epf_mhi->dma_wq =alloc_workqueue ("pci_epf_mhi_dma_wq" ,WQ_PERCPU ,0 );if (!epf_mhi->dma_wq) { ret = -ENOMEM ; goto err_release_rx;
drivers/pci/endpoint/functions/pci-epf-ntb.c +3 -2
@@ -2124,8 +2124,9 @@ static int __init epf_ntb_init(void) {int ret; - kpcintb_workqueue =alloc_workqueue ("kpcintb" ,WQ_MEM_RECLAIM | -WQ_HIGHPRI ,0 ); + kpcintb_workqueue =alloc_workqueue ("kpcintb" , +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 ); ret =pci_epf_register_driver (&epf_ntb_driver);if (ret) {destroy_workqueue (kpcintb_workqueue);
drivers/pci/endpoint/functions/pci-epf-test.c +2 -1
@@ -1036,7 +1036,8 @@ static int __init pci_epf_test_init(void)int ret; kpcitest_workqueue =alloc_workqueue ("kpcitest" , -WQ_MEM_RECLAIM |WQ_HIGHPRI ,0 ); +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 );if (!kpcitest_workqueue) {pr_err ("Failed to allocate the kpcitest work queue\n" );return -ENOMEM ;
drivers/pci/endpoint/functions/pci-epf-vntb.c +3 -2
@@ -1434,8 +1434,9 @@ static int __init epf_ntb_init(void) {int ret; - kpcintb_workqueue =alloc_workqueue ("kpcintb" ,WQ_MEM_RECLAIM | -WQ_HIGHPRI ,0 ); + kpcintb_workqueue =alloc_workqueue ("kpcintb" , +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 ); ret =pci_epf_register_driver (&epf_ntb_driver);if (ret) {destroy_workqueue (kpcintb_workqueue);
drivers/pci/hotplug/pnv_php.c +2 -1
@@ -844,7 +844,8 @@ static void pnv_php_init_irq(struct pnv_php_slot *php_slot, int irq)int ret;/* Allocate workqueue */ - php_slot->wq =alloc_workqueue ("pciehp-%s" ,0 ,0 , php_slot->name); + php_slot->wq =alloc_workqueue ("pciehp-%s" ,WQ_PERCPU ,0 , + php_slot->name);if (!php_slot->wq) {SLOT_WARN (php_slot,"Cannot alloc workqueue\n" );pnv_php_disable_irq (php_slot, true);
drivers/pci/hotplug/shpchp_core.c +2 -1
@@ -80,7 +80,8 @@ static int init_slots(struct controller *ctrl) slot->device = ctrl->slot_device_offset + i; slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); - slot->wq =alloc_workqueue ("shpchp-%d" ,0 ,0 , slot->number); + slot->wq =alloc_workqueue ("shpchp-%d" ,WQ_PERCPU ,0 , + slot->number);if (!slot->wq) { retval = -ENOMEM ; goto error_slot;
drivers/platform/surface/surface_acpi_notify.c +1 -1
@@ -862,7 +862,7 @@ static int __init san_init(void) {int ret; - san_wq =alloc_workqueue ("san_wq" ,0 ,0 ); + san_wq =alloc_workqueue ("san_wq" ,WQ_PERCPU ,0 );if (!san_wq)return -ENOMEM ; ret =platform_driver_register (&surface_acpi_notify);
drivers/rapidio/rio.c +1 -1
@@ -2097,7 +2097,7 @@ int rio_init_mports(void)* TODO: Implement restart of discovery process for all or * individual discovering mports. */ - rio_wq =alloc_workqueue ("riodisc" ,0 ,0 ); + rio_wq =alloc_workqueue ("riodisc" ,WQ_PERCPU ,0 );if (!rio_wq) {pr_err ("RIO: unable allocate rio_wq\n" ); goto no_disc;
drivers/scsi/be2iscsi/be_main.c +2 -1
@@ -5633,7 +5633,8 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, phba->ctrl.mcc_alloc_index = phba->ctrl.mcc_free_index =0 ; - phba->wq =alloc_workqueue ("beiscsi_%02x_wq" ,WQ_MEM_RECLAIM ,1 , + phba->wq =alloc_workqueue ("beiscsi_%02x_wq" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , phba->shost->host_no);if (!phba->wq) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +1 -1
@@ -2695,7 +2695,7 @@ static int __init bnx2fc_mod_init(void)if (rc) goto detach_ft; - bnx2fc_wq =alloc_workqueue ("bnx2fc" ,0 ,0 ); + bnx2fc_wq =alloc_workqueue ("bnx2fc" ,WQ_PERCPU ,0 );if (!bnx2fc_wq) { rc = -ENOMEM ; goto release_bt;
drivers/scsi/device_handler/scsi_dh_alua.c +1 -1
@@ -1300,7 +1300,7 @@ static int __init alua_init(void) {int r; - kaluad_wq =alloc_workqueue ("kaluad" ,WQ_MEM_RECLAIM ,0 ); + kaluad_wq =alloc_workqueue ("kaluad" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!kaluad_wq)return -ENOMEM ;
drivers/scsi/fcoe/fcoe.c +1 -1
@@ -2458,7 +2458,7 @@ static int __init fcoe_init(void)unsigned int cpu;int rc =0 ; - fcoe_wq =alloc_workqueue ("fcoe" ,0 ,0 ); + fcoe_wq =alloc_workqueue ("fcoe" ,WQ_PERCPU ,0 );if (!fcoe_wq)return -ENOMEM ;
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +2 -1
@@ -3533,7 +3533,8 @@ static int ibmvscsis_probe(struct vio_dev *vdev,init_completion (&vscsi->wait_idle);init_completion (&vscsi->unconfig); - vscsi->work_q =alloc_workqueue ("ibmvscsis%s" ,WQ_MEM_RECLAIM ,1 , + vscsi->work_q =alloc_workqueue ("ibmvscsis%s" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 ,dev_name (&vdev->dev));if (!vscsi->work_q) { rc = -ENOMEM ;
drivers/scsi/lpfc/lpfc_init.c +1 -1
@@ -7938,7 +7938,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)/* Allocate all driver workqueues here */ /* The lpfc_wq workqueue for deferred irq use */ - phba->wq =alloc_workqueue ("lpfc_wq" ,WQ_MEM_RECLAIM ,0 ); + phba->wq =alloc_workqueue ("lpfc_wq" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!phba->wq)return -ENOMEM ;
drivers/scsi/pm8001/pm8001_init.c +1 -1
@@ -1533,7 +1533,7 @@ static int __init pm8001_init(void)if (pm8001_use_tasklet && !pm8001_use_msix) pm8001_use_tasklet = false; - pm8001_wq =alloc_workqueue ("pm80xx" ,0 ,0 ); + pm8001_wq =alloc_workqueue ("pm80xx" ,WQ_PERCPU ,0 );if (!pm8001_wq) goto err;
drivers/scsi/qedf/qedf_main.c +10 -5
@@ -3374,7 +3374,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)QEDF_INFO (&(qedf->dbg_ctx),QEDF_LOG_INFO ,"qedf->io_mempool=%p.\n" , qedf->io_mempool); - qedf->link_update_wq =alloc_workqueue ("qedf_%u_link" ,WQ_MEM_RECLAIM , + qedf->link_update_wq =alloc_workqueue ("qedf_%u_link" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , qedf->lport->host->host_no);INIT_DELAYED_WORK (&qedf->link_update, qedf_handle_link_update);INIT_DELAYED_WORK (&qedf->link_recovery, qedf_link_recovery);
@@ -3585,7 +3586,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)ether_addr_copy (params.ll2_mac_address, qedf->mac);/* Start LL2 processing thread */ - qedf->ll2_recv_wq =alloc_workqueue ("qedf_%d_ll2" ,WQ_MEM_RECLAIM ,1 , + qedf->ll2_recv_wq =alloc_workqueue ("qedf_%d_ll2" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , host->host_no);if (!qedf->ll2_recv_wq) {QEDF_ERR (&(qedf->dbg_ctx),"Failed to LL2 workqueue.\n" );
@@ -3628,7 +3630,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) } qedf->timer_work_queue =alloc_workqueue ("qedf_%u_timer" , -WQ_MEM_RECLAIM ,1 , qedf->lport->host->host_no); +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , + qedf->lport->host->host_no);if (!qedf->timer_work_queue) {QEDF_ERR (&(qedf->dbg_ctx),"Failed to start timer " "workqueue.\n" );
@@ -3641,7 +3644,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)sprintf (host_buf,"qedf_%u_dpc" , qedf->lport->host->host_no); qedf->dpc_wq = -alloc_workqueue ("%s" ,WQ_MEM_RECLAIM ,1 , host_buf); +alloc_workqueue ("%s" ,WQ_MEM_RECLAIM |WQ_PERCPU ,1 , + host_buf); }INIT_DELAYED_WORK (&qedf->recovery_work, qedf_recovery_handler);
@@ -4177,7 +4181,8 @@ static int __init qedf_init(void) goto err3; } - qedf_io_wq =alloc_workqueue ("%s" ,WQ_MEM_RECLAIM ,1 ,"qedf_io_wq" ); + qedf_io_wq =alloc_workqueue ("%s" ,WQ_MEM_RECLAIM |WQ_PERCPU ,1 , +"qedf_io_wq" );if (!qedf_io_wq) {QEDF_ERR (NULL ,"Could not create qedf_io_wq.\n" ); goto err4;
drivers/scsi/qedi/qedi_main.c +1 -1
@@ -2776,7 +2776,7 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) } qedi->offload_thread =alloc_workqueue ("qedi_ofld%d" , -WQ_MEM_RECLAIM , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , qedi->shost->host_no);if (!qedi->offload_thread) { QEDI_ERR(&qedi->dbg_ctx,
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -3409,7 +3409,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)"req->req_q_in=%p req->req_q_out=%p rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n" , req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out); - ha->wq =alloc_workqueue ("qla2xxx_wq" ,WQ_MEM_RECLAIM ,0 ); + ha->wq =alloc_workqueue ("qla2xxx_wq" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (unlikely (!ha->wq)) { ret = -ENOMEM ; goto probe_failed;
drivers/scsi/qla2xxx/qla_target.c +1 -1
@@ -7300,7 +7300,7 @@ int __init qlt_init(void) goto out_plogi_cachep; } - qla_tgt_wq =alloc_workqueue ("qla_tgt_wq" ,0 ,0 ); + qla_tgt_wq =alloc_workqueue ("qla_tgt_wq" ,WQ_PERCPU ,0 );if (!qla_tgt_wq) {ql_log (ql_log_fatal,NULL ,0xe06f ,"alloc_workqueue for qla_tgt_wq failed\n" );
drivers/scsi/qla2xxx/tcm_qla2xxx.c +1 -1
@@ -1884,7 +1884,7 @@ static int tcm_qla2xxx_register_configfs(void) goto out_fabric; tcm_qla2xxx_free_wq =alloc_workqueue ("tcm_qla2xxx_free" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!tcm_qla2xxx_free_wq) { ret = -ENOMEM ; goto out_fabric_npiv;
drivers/scsi/qla4xxx/ql4_os.c +2 -1
@@ -8815,7 +8815,8 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev, }INIT_WORK (&ha->dpc_work, qla4xxx_do_dpc); - ha->task_wq =alloc_workqueue ("qla4xxx_%lu_task" ,WQ_MEM_RECLAIM ,1 , + ha->task_wq =alloc_workqueue ("qla4xxx_%lu_task" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 , ha->host_no);if (!ha->task_wq) {ql4_printk (KERN_WARNING , ha,"Unable to start task thread!\n" );
drivers/scsi/scsi_transport_fc.c +4 -3
@@ -441,13 +441,14 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, fc_host->next_vport_number =0 ; fc_host->npiv_vports_inuse =0 ; - fc_host->work_q =alloc_workqueue ("fc_wq_%d" ,0 ,0 , shost->host_no); + fc_host->work_q =alloc_workqueue ("fc_wq_%d" ,WQ_PERCPU ,0 , + shost->host_no);if (!fc_host->work_q)return -ENOMEM ; fc_host->dev_loss_tmo = fc_dev_loss_tmo; - fc_host->devloss_work_q =alloc_workqueue ("fc_dl_%d" ,0 ,0 , - shost->host_no); + fc_host->devloss_work_q =alloc_workqueue ("fc_dl_%d" ,WQ_PERCPU ,0 , + shost->host_no);if (!fc_host->devloss_work_q) {destroy_workqueue (fc_host->work_q); fc_host->work_q =NULL ;
drivers/soc/fsl/qbman/qman.c +1 -1
@@ -1073,7 +1073,7 @@ EXPORT_SYMBOL(qman_portal_set_iperiod);int qman_wq_alloc (void ) { - qm_portal_wq =alloc_workqueue ("qman_portal_wq" ,0 ,1 ); + qm_portal_wq =alloc_workqueue ("qman_portal_wq" ,WQ_PERCPU ,1 );if (!qm_portal_wq)return -ENOMEM ;return 0 ;
drivers/staging/greybus/sdio.c +1 -1
@@ -806,7 +806,7 @@ static int gb_sdio_probe(struct gbphy_device *gbphy_dev,mutex_init (&host->lock);spin_lock_init (&host->xfer); - host->mrq_workqueue =alloc_workqueue ("mmc-%s" ,0 ,1 , + host->mrq_workqueue =alloc_workqueue ("mmc-%s" ,WQ_PERCPU ,1 ,dev_name (&gbphy_dev->dev));if (!host->mrq_workqueue) { ret = -ENOMEM ;
drivers/target/target_core_transport.c +2 -2
@@ -126,12 +126,12 @@ int init_se_kmem_caches(void) } target_completion_wq =alloc_workqueue ("target_completion" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!target_completion_wq) goto out_free_lba_map_mem_cache; target_submission_wq =alloc_workqueue ("target_submission" , -WQ_MEM_RECLAIM ,0 ); +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!target_submission_wq) goto out_free_completion_wq;
drivers/target/target_core_xcopy.c +1 -1
@@ -462,7 +462,7 @@ static const struct target_core_fabric_ops xcopy_pt_tfo = {int target_xcopy_setup_pt (void ) { - xcopy_wq =alloc_workqueue ("xcopy_wq" ,WQ_MEM_RECLAIM ,0 ); + xcopy_wq =alloc_workqueue ("xcopy_wq" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!xcopy_wq) {pr_err ("Unable to allocate xcopy_wq\n" );return -ENOMEM ;
drivers/target/tcm_fc/tfc_conf.c +1 -1
@@ -250,7 +250,7 @@ static struct se_portal_group *ft_add_tpg(struct se_wwn *wwn, const char *name) tpg->lport_wwn = ft_wwn;INIT_LIST_HEAD (&tpg->lun_list); - wq =alloc_workqueue ("tcm_fc" ,0 ,1 ); + wq =alloc_workqueue ("tcm_fc" ,WQ_PERCPU ,1 );if (!wq) {kfree (tpg);return NULL ;
drivers/usb/core/hub.c +1 -1
@@ -6038,7 +6038,7 @@ int usb_hub_init(void)* device was gone before the EHCI controller had handed its port * over to the companion full-speed controller. */ - hub_wq =alloc_workqueue ("usb_hub_wq" ,WQ_FREEZABLE ,0 ); + hub_wq =alloc_workqueue ("usb_hub_wq" ,WQ_FREEZABLE |WQ_PERCPU ,0 );if (hub_wq)return 0 ;
drivers/usb/gadget/function/f_hid.c +1 -2
@@ -1254,8 +1254,7 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f)INIT_WORK (&hidg->work, get_report_workqueue_handler); hidg->workqueue =alloc_workqueue ("report_work" , -WQ_FREEZABLE | -WQ_MEM_RECLAIM , +WQ_FREEZABLE |WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!hidg->workqueue) {
drivers/usb/storage/uas.c +1 -1
@@ -1265,7 +1265,7 @@ static int __init uas_init(void) {int rv; - workqueue =alloc_workqueue ("uas" ,WQ_MEM_RECLAIM ,0 ); + workqueue =alloc_workqueue ("uas" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!workqueue)return -ENOMEM ;
drivers/usb/typec/anx7411.c +1 -2
@@ -1516,8 +1516,7 @@ static int anx7411_i2c_probe(struct i2c_client *client)INIT_WORK (&plat->work, anx7411_work_func); plat->workqueue =alloc_workqueue ("anx7411_work" , -WQ_FREEZABLE | -WQ_MEM_RECLAIM , +WQ_FREEZABLE |WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!plat->workqueue) {dev_err (dev,"fail to create work queue\n" );
drivers/vdpa/vdpa_user/vduse_dev.c +2 -1
@@ -2172,7 +2172,8 @@ static int vduse_init(void)if (!vduse_irq_wq) goto err_wq; - vduse_irq_bound_wq =alloc_workqueue ("vduse-irq-bound" ,WQ_HIGHPRI ,0 ); + vduse_irq_bound_wq =alloc_workqueue ("vduse-irq-bound" , +WQ_HIGHPRI |WQ_PERCPU ,0 );if (!vduse_irq_bound_wq) goto err_bound_wq;
drivers/virtio/virtio_balloon.c +2 -1
@@ -987,7 +987,8 @@ static int virtballoon_probe(struct virtio_device *vdev) goto out_del_vqs; } vb->balloon_wq =alloc_workqueue ("balloon-wq" , -WQ_FREEZABLE |WQ_CPU_INTENSIVE ,0 ); +WQ_FREEZABLE |WQ_CPU_INTENSIVE |WQ_PERCPU , +0 );if (!vb->balloon_wq) { err = -ENOMEM ; goto out_del_vqs;
drivers/xen/privcmd.c +2 -1
@@ -1093,7 +1093,8 @@ static long privcmd_ioctl_irqfd(struct file *file, void __user *udata)static int privcmd_irqfd_init (void ) { - irqfd_cleanup_wq =alloc_workqueue ("privcmd-irqfd-cleanup" ,0 ,0 ); + irqfd_cleanup_wq =alloc_workqueue ("privcmd-irqfd-cleanup" ,WQ_PERCPU , +0 );if (!irqfd_cleanup_wq)return -ENOMEM ;
Signature · 1 line
2.51.0