linux-kernelorg-stable/drivers
Marco Crivellari 13f4d99582 ata: libata-sff: add WQ_PERCPU 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 consistency 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 continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:

commit 128ea9f6cc ("workqueue: Add system_percpu_wq and system_dfl_wq")
commit 930c2ea566 ("workqueue: Add new WQ_PERCPU flag")

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>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
2025-11-07 09:42:36 +01:00
..
accel
accessibility
acpi More ACPI support updates for 6.18-rc1 2025-10-07 09:45:07 -07:00
amba
android
ata ata: libata-sff: add WQ_PERCPU to alloc_workqueue users 2025-11-07 09:42:36 +01:00
atm
auxdisplay
base More power management updates for 6.18-rc1 2025-10-07 09:39:51 -07:00
bcma
block block-6.18-20251009 2025-10-10 10:37:13 -07:00
bluetooth
bus Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
cache
cdrom
cdx Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
char tpm: Prevent local DOS via tpm/tpm0/ppi/*operations 2025-10-10 08:21:45 +03:00
clk There's a bunch of patches here across drivers/clk/ to migrate drivers to use 2025-10-07 09:28:37 -07:00
clocksource hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
comedi
connector
counter
cpufreq
cpuidle
crypto This push contains the following changes: 2025-10-08 09:38:31 -07:00
cxl
dax
dca
devfreq
dibs
dio
dma dmaengine updates for v6.18 2025-10-06 10:37:06 -07:00
dma-buf
dpll
edac
eisa
extcon
firewire
firmware EFI updates for v6.18 2025-10-05 12:08:14 -07:00
fpga
fsi
fwctl
gnss
gpio gpio: wcd934x: mark the GPIO controller as sleeping 2025-10-10 09:37:19 +02:00
gpu drm next fixes for 6.18-rc1 2025-10-10 14:02:14 -07:00
greybus
hid hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
hsi
hte
hv
hwmon
hwspinlock
hwtracing Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
i2c Revert "i2c: boardinfo: Annotate code used in init phase only" 2025-10-11 23:57:33 +02:00
i3c
idle
iio
infiniband RDMA v6.18 merge window pull request 2025-10-03 18:35:22 -07:00
input Input updates for v6.18-rc0 2025-10-08 09:44:38 -07:00
interconnect
iommu iommufd 6.18 merge window pull 2025-10-03 18:18:48 -07:00
ipack
irqchip irqchip/sifive-plic: Avoid interrupt ID 0 handling during suspend/resume 2025-10-07 10:23:22 +02:00
isdn
leds
macintosh
mailbox qcom: add Glymur CPUCP mailbox binding 2025-10-08 11:44:21 -07:00
mcb
md dm docs: fix typos 2025-10-03 18:48:02 -07:00
media USB/Thunderbolt changes for 6.18-rc1 2025-10-04 16:07:08 -07:00
memory
memstick
message
mfd
misc - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
mmc
most
mtd MTD core: 2025-10-04 15:50:37 -07:00
mux
net Including fixes from netfilter. 2025-10-09 11:13:08 -07:00
nfc
ntb
nubus
nvdimm libnvdimm for 6.18 2025-10-06 11:17:18 -07:00
nvme
nvmem Char/Misc fixes for 6.18-rc1 2025-10-07 12:13:26 -07:00
of Devicetree fixes for v6.18: 2025-10-10 13:05:40 -07:00
opp
parisc
parport
pci pci-v6.18-fixes-1 2025-10-08 18:51:00 -07:00
pcmcia
peci
perf arm64 fixes for -rc1 2025-10-07 08:59:25 -07:00
phy phy-for-6.18 2025-10-06 10:34:22 -07:00
pinctrl pci-v6.18-changes 2025-10-06 10:41:03 -07:00
platform platform-drivers-x86 for v6.18-1 2025-10-04 15:28:18 -07:00
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc remoteproc updates for v6.18 2025-10-04 15:45:17 -07:00
reset
rpmsg
rtc RTC for 6.18 2025-10-11 11:56:47 -07:00
s390 more s390 updates for 6.18 merge window 2025-10-09 10:51:43 -07:00
sbus
scsi SCSI misc on 20251011 2025-10-11 11:49:00 -07:00
sh
siox
slimbus
soc - switch longson32 platform to DT and use MIPS_GENERIC framework 2025-10-05 10:09:55 -07:00
soundwire soundwire updates for 6.18 2025-10-06 10:32:22 -07:00
spi
spmi
ssb
staging Staging driver fixes for 6.18-rc1 2025-10-07 11:41:06 -07:00
target SCSI misc on 20251011 2025-10-11 11:49:00 -07:00
tc
tee
thermal
thunderbolt
tty TTY driver fix for 6.18-rc1 2025-10-07 11:36:01 -07:00
ufs SCSI misc on 20251011 2025-10-11 11:49:00 -07:00
uio hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
usb USB/Thunderbolt changes for 6.18-rc1 2025-10-04 16:07:08 -07:00
vdpa
vfio vfio: Dump migration features under debugfs 2025-10-06 11:22:48 -06:00
vhost
video fbdev fixes & enhancements for 6.18-rc1: 2025-10-10 09:36:23 -07:00
virt
virtio virtio,vhost: fixes, cleanups 2025-10-04 08:48:16 -07:00
w1
watchdog linux-watchdog 6.18-rc1 tag 2025-10-06 11:00:30 -07:00
xen dma-mapping updates for Linux 6.18: 2025-10-03 17:41:12 -07:00
zorro
Kconfig
Makefile hyperv-next for v6.18 2025-10-07 08:40:15 -07:00