mirror-linux/drivers/scsi
Marco Crivellari afad6b34de scsi: scsi_dh_alua: WQ_PERCPU added to alloc_workqueue() users
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.

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 change adds a new WQ_PERCPU flag to explicitly request
alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified.

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.

Once migration is complete, WQ_UNBOUND can be removed and unbound will
become the implicit default.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20251031095643.74246-4-marco.crivellari@suse.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-12 21:28:26 -05:00
..
aacraid scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aic7xxx scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aic94xx scsi: aic94xx: Remove redundant code 2025-08-25 11:58:46 -04:00
arcmsr scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
arm treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
be2iscsi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bfa scsi: bfa: Remove self-assignment code 2025-09-09 22:57:37 -04:00
bnx2fc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bnx2i treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
csiostor scsi: csiostor: Fix some spelling errors 2025-08-30 21:47:03 -04:00
cxgbi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
device_handler scsi: scsi_dh_alua: WQ_PERCPU added to alloc_workqueue() users 2025-11-12 21:28:26 -05:00
elx SCSI misc on 20250730 2025-07-31 12:13:53 -07:00
esas2r sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
fcoe scsi: fcoe: Remove fcoe_select_cpu() 2025-06-09 21:30:14 -04:00
fnic scsi: fnic: Remove a useless struct mempool forward declaration 2025-08-14 22:23:32 -04:00
hisi_sas scsi: hisi_sas: Use dev_parent_is_expander() helper 2025-08-18 22:08:30 -04:00
ibmvscsi sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
ibmvscsi_tgt scsi: ibmvscsi_tgt: Fix dma_unmap_sg() nents value 2025-07-14 20:56:49 -04:00
isci scsi: isci: Use dev_parent_is_expander() helper 2025-08-18 22:08:30 -04:00
libfc scsi: libfc: Fix potential buffer overflow in fc_ct_ms_fill() 2025-09-24 21:57:03 -04:00
libsas SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
lpfc pci-v6.18-changes 2025-10-06 10:41:03 -07:00
megaraid scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
mpi3mr SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
mpt3sas SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
mvsas scsi: mvsas: Fix use-after-free bugs in mvs_work_queue 2025-09-29 17:26:20 -04:00
pcmcia scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
pm8001 scsi: pm80xx: Avoid -Wflex-array-member-not-at-end warnings 2025-09-09 22:40:32 -04:00
qedf sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
qedi scsi: qedi: Remove unused qedi_get_proto_itt() 2025-04-21 21:51:09 -04:00
qla2xxx scsi: qla2xxx: WQ_PERCPU added to alloc_workqueue() users 2025-11-12 21:28:25 -05:00
qla4xxx scsi: qla4xxx: Prevent a potential error pointer dereference 2025-08-14 23:22:46 -04:00
smartpqi scsi: smartpqi: Replace kmalloc() + copy_from_user() with memdup_user() 2025-09-24 21:41:24 -04:00
snic scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
sym53c8xx_2 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
.gitignore
3w-9xxx.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
3w-9xxx.h
3w-sas.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
3w-sas.h
3w-xxxx.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
3w-xxxx.h
53c700.c scsi: Convert SCSI drivers to .sdev_configure() 2024-12-04 15:34:28 -05:00
53c700.h
53c700.scr
53c700_d.h_shipped
BusLogic.c for-6.18/block-20250929 2025-10-02 10:16:56 -07:00
BusLogic.h scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
FlashPoint.c
Kconfig Drivers: hv: Add CONFIG_HYPERV_VMBUS option 2025-10-01 00:00:42 +00:00
Makefile scsi: cxlflash: Remove driver 2025-02-03 18:04:55 -05:00
NCR5380.c scsi: NCR5380: Clean up indentation 2024-08-12 22:05:50 -04:00
NCR5380.h scsi: NCR5380: Clean up indentation 2024-08-12 22:05:50 -04:00
a100u2w.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
a100u2w.h
a2091.c
a2091.h
a3000.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
a3000.h
a4000t.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
advansys.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aha152x.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aha152x.h
aha1542.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aha1542.h
aha1740.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
aha1740.h
am53c974.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
atari_scsi.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
atp870u.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
atp870u.h
bvme6000_scsi.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
ch.c
constants.c
dc395x.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dc395x.h
dmx3191d.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
esp_scsi.c scsi: Convert SCSI drivers to .sdev_configure() 2024-12-04 15:34:28 -05:00
esp_scsi.h scsi: esp: Fix variable typo 2025-01-02 13:42:35 -05:00
fdomain.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
fdomain.h
fdomain_isa.c
fdomain_pci.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
g_NCR5380.c scsi: Add missing MODULE_DESCRIPTION() macros 2024-06-11 21:33:58 -04:00
gvp11.c
gvp11.h
hosts.c scsi: core: Enforce unlimited max_segment_size when virt_boundary_mask is set 2025-06-24 21:20:58 -04:00
hpsa.c scsi: hpsa: Replace kmalloc() + copy_from_user() with memdup_user() 2025-09-24 21:41:24 -04:00
hpsa.h
hpsa_cmd.h
hptiop.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
hptiop.h
imm.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
imm.h
initio.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
initio.h
ipr.c SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
ipr.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ips.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
ips.h scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
iscsi_boot_sysfs.c
iscsi_tcp.c scsi: iscsi_tcp: Switch to using the crc32c library 2025-02-12 22:05:10 -05:00
iscsi_tcp.h scsi: iscsi_tcp: Switch to using the crc32c library 2025-02-12 22:05:10 -05:00
jazz_esp.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
lasi700.c
libiscsi.c scsi: libiscsi: Initialize iscsi_conn->dd_data only if memory is allocated 2025-07-21 23:48:36 -04:00
libiscsi_tcp.c scsi: iscsi_tcp: Switch to using the crc32c library 2025-02-12 22:05:10 -05:00
mac53c94.c
mac53c94.h
mac_esp.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
mac_scsi.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
megaraid.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
megaraid.h scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
mesh.c
mesh.h
mvme16x_scsi.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
mvme147.c
mvme147.h
mvumi.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
mvumi.h
myrb.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
myrb.h scsi: myrb: Simplify an alloc_ordered_workqueue() invocation 2024-08-22 21:28:56 -04:00
myrs.c scsi: myrs: Fix dma_alloc_coherent() error check 2025-08-19 22:30:57 -04:00
myrs.h scsi: myrs: Simplify an alloc_ordered_workqueue() invocation 2024-08-22 21:28:56 -04:00
ncr53c8xx.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ncr53c8xx.h
nsp32.c scsi: Constify struct pci_device_id 2024-12-09 21:59:52 -05:00
nsp32.h
nsp32_debug.c
nsp32_io.h
pmcraid.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
pmcraid.h
ppa.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
ppa.h
ps3rom.c scsi: Convert SCSI drivers to .sdev_configure() 2024-12-04 15:34:28 -05:00
qla1280.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
qla1280.h scsi: qla1280: Fix hw revision numbering for ISP1020/1040 2024-11-20 21:32:48 -05:00
qlogicfas.c
qlogicfas408.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
qlogicfas408.h scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
qlogicpti.c scsi: Convert SCSI drivers to .sdev_configure() 2024-12-04 15:34:28 -05:00
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c scsi: core: Fix kernel doc for scsi_track_queue_full() 2025-07-14 20:56:55 -04:00
scsi_bsg.c
scsi_common.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
scsi_debug.c SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
scsi_debugfs.c
scsi_debugfs.h
scsi_devinfo.c scsi: scsi_devinfo: Remove redundant 'found' 2025-06-24 21:17:22 -04:00
scsi_dh.c
scsi_error.c scsi: error: alua: I/O errors for ALUA state transitions 2025-06-09 22:02:13 -04:00
scsi_ioctl.c block: remove the q argument from blk_rq_map_kern 2025-05-07 07:31:07 -06:00
scsi_lib.c scsi: scsi_lib: drop nth_page() usage within SG entry 2025-09-21 14:22:08 -07:00
scsi_lib_dma.c
scsi_lib_test.c scsi: core: Add passthrough tests for success and no failure definitions 2025-01-21 12:16:17 -05:00
scsi_logging.c
scsi_logging.h
scsi_netlink.c
scsi_pm.c
scsi_priv.h scsi: core: Remove unused scsi_dev_info_list_del_keyed() 2025-05-12 22:11:55 -04:00
scsi_proc.c
scsi_proto_test.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
scsi_sas_internal.h
scsi_scan.c scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans 2025-07-24 22:00:43 -04:00
scsi_sysctl.c scsi: logging: Fix scsi_logging_level bounds 2025-03-03 22:11:48 -05:00
scsi_sysfs.c Merge branch '6.17/scsi-queue' into 6.17/scsi-fixes 2025-08-12 21:36:18 -04:00
scsi_trace.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
scsi_transport_api.h
scsi_transport_fc.c scsi: scsi_transport_fc: Add comments to describe added 'rport' parameter 2025-07-21 23:13:34 -04:00
scsi_transport_iscsi.c scsi: scsi_transport_iscsi: Replace use of system_unbound_wq with system_dfl_wq 2025-11-12 21:15:18 -05:00
scsi_transport_sas.c scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans 2025-07-24 22:00:43 -04:00
scsi_transport_spi.c scsi: transport: sas: spi: Fix kernel-doc for exported functions 2025-01-10 15:15:20 -05:00
scsi_transport_srp.c scsi: scsi_transport_srp: Replace min/max nesting with clamp() 2025-04-03 10:54:31 -04:00
scsicam.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
sd.c SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
sd.h scsi: sd: Atomic write support 2024-06-20 15:19:17 -06:00
sd_dif.c block: introduce pi_tuple_size field in blk_integrity 2025-07-01 14:00:15 +02:00
sd_trace.h
sd_zbc.c scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer 2025-05-12 22:35:48 -04:00
sense_codes.h
ses.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sg.c scsi: sg: drop nth_page() usage within SG entry 2025-09-21 14:22:08 -07:00
sgiwd93.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
sim710.c
sni_53c710.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
sr.c scsi: sr: Reinstate rotational media flag 2025-08-30 21:46:21 -04:00
sr.h
sr_ioctl.c minmax: scsi: fix mis-use of 'clamp()' in sr.c 2024-07-28 17:06:20 -07:00
sr_vendor.c
st.c scsi: st: Tighten the page format heuristics with MODE SELECT 2025-03-17 22:04:22 -04:00
st.h scsi: st: Modify st.c to use the new scsi_error counters 2025-02-03 17:43:31 -05:00
st_options.h
stex.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
storvsc_drv.c SCSI misc on 20251002 2025-10-03 19:17:48 -07:00
sun3_scsi.c scsi: sun3: Mark driver struct with __refdata to prevent section mismatch 2024-11-06 21:06:44 -05:00
sun3_scsi_vme.c
sun3x_esp.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
sun_esp.c scsi: Switch back to struct platform_driver::remove() 2024-11-06 20:45:25 -05:00
virtio_scsi.c virtio: blk/scsi: use block layer helpers to calculate num of queues 2025-07-01 10:24:19 -06:00
vmw_pvscsi.c scsi: Expand all create*_workqueue() invocations 2024-08-22 21:28:55 -04:00
vmw_pvscsi.h
wd33c93.c scsi: wd33c93: Don't use stale scsi_pointer value 2024-10-03 21:48:08 -04:00
wd33c93.h
wd719x.c scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
wd719x.h
xen-scsifront.c scsi: Convert SCSI drivers to .sdev_configure() 2024-12-04 15:34:28 -05:00
zalon.c scsi: zalon: Remove trailing space after \n newline 2024-09-12 20:25:43 -04:00
zorro7xx.c
zorro_esp.c