mirror-linux/drivers
Marco Crivellari cc2ec444e4 power: supply: 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 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.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://lore.kernel.org/r/20250905090641.106297-3-marco.crivellari@suse.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-09-09 00:53:46 +02:00
..
accel Merge drm/drm-fixes into drm-misc-fixes 2025-08-20 16:08:49 +02:00
accessibility
acpi Merge branches 'acpi-apei' and 'acpi-pfrut' 2025-08-21 20:47:23 +02:00
amba
android
ata ata: libata-scsi: Fix CDL control 2025-08-14 18:58:12 +09:00
atm
auxdisplay
base regmap: Fixes for v6.17 2025-08-09 08:40:28 +03:00
bcma treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
block loop: use vfs_getattr_nosec for accurate file size 2025-08-18 13:10:35 -06:00
bluetooth Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling 2025-08-15 10:13:26 -04:00
bus
cache
cdrom
cdx cdx: Fix off-by-one error in cdx_rpmsg_probe() 2025-08-19 12:55:16 +02:00
char Some small fixes for the IPMI driver 2025-08-07 07:38:25 +03:00
clk This is the usual collection of primarily clk driver updates. The big part of 2025-07-31 13:36:27 -07:00
clocksource A treewide cleanup of struct cycle_counter const annotations: 2025-07-29 14:02:53 -07:00
comedi comedi: Make insn_rw_emulate_bits() do insn->n samples 2025-08-19 12:57:01 +02:00
connector
counter
cpufreq cpufreq: intel_pstate: Support Clearwater Forest OOB mode 2025-08-11 21:49:47 +02:00
cpuidle cpuidle: governors: menu: Avoid selecting states with too much latency 2025-08-18 19:04:25 +02:00
crypto This update includes the following changes: 2025-07-31 09:45:28 -07:00
cxl Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
dax
dca
devfreq
dio
dma dmaengine updates for v6.17 2025-08-01 12:35:12 -07:00
dma-buf drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
dpll dpll: zl3073x: ZL3073X_I2C and ZL3073X_SPI should depend on NET 2025-08-04 17:22:55 -07:00
edac - i10nm: 2025-07-29 16:30:38 -07:00
eisa
extcon
firewire firewire: core: reallocate buffer for FCP address handlers when more than 4 are registered 2025-08-03 21:20:15 +09:00
firmware EFI updates for v6.17 2025-08-09 18:10:01 +03:00
fpga fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable() 2025-08-19 12:54:45 +02:00
fsi
fwctl
gnss
gpio gpio: mlxbf3: use platform_get_irq_optional() 2025-08-12 15:40:28 +02:00
gpu - xe_vm_create fixes (Piotr) 2025-08-23 07:24:52 +10:00
greybus
hid treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
hsi
hte
hv ARM: 2025-07-30 17:14:01 -07:00
hwmon treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
hwspinlock
hwtracing
i2c i2c: rtl9300: Add missing count byte for SMBus Block Ops 2025-08-19 20:21:03 -01:00
i3c i3c: add missing include to internal header 2025-07-31 02:25:17 +02:00
idle intel_idle: Allow loading ACPI tables for any family 2025-08-11 21:43:26 +02:00
iio iio: pressure: bmp280: Use IS_ERR() in bmp280_common_probe() 2025-08-18 19:22:18 +01:00
infiniband RDMA/hns: Fix dip entries leak on devices newer than hip09 2025-08-13 07:22:18 -04:00
input treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
interconnect
iommu iommufd 6.17 first rc pull 2025-08-22 17:24:48 -04:00
ipack
irqchip irqchip/mvebu-gicp: Use resource_size() for ioremap() 2025-08-06 17:00:40 +02:00
isdn
leds treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
macintosh
mailbox mailbox/pcc: support mailbox management of the shared buffer 2025-08-07 23:49:56 -05:00
mcb
md md: fix sync_action incorrect display during resync 2025-08-16 08:52:33 +08:00
media treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
memory
memstick memstick: Fix deadlock by moving removing flag earlier 2025-08-18 12:01:20 +02:00
message
mfd treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
misc treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
mmc mmc: sdhci_am654: Disable HS400 for AM62P SR1.0 and SR1.1 2025-08-21 11:07:16 +02:00
most most: core: Drop device reference after usage in get_channel() 2025-08-19 12:57:34 +02:00
mtd * MTD changes: 2025-07-31 13:43:02 -07:00
mux
net net/mlx5e: Preserve shared buffer capacity during headroom updates 2025-08-21 07:58:33 -07:00
nfc
ntb
nubus
nvdimm Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
nvme nvmet: exit debugfs after discovery subsystem exits 2025-08-07 06:27:58 -06:00
nvmem
of ARM: 2025-07-30 17:14:01 -07:00
opp
parisc
parport
pci PCI: vmd: Remove MSI-X check on child devices 2025-08-12 13:45:01 -05:00
pcmcia
peci
perf
phy phy-for-6.17 2025-08-01 12:31:50 -07:00
pinctrl treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
platform platform/x86: hp-wmi: mark Victus 16-r1xxx for victus_s fan and thermal profile support 2025-08-12 15:23:09 +03:00
pmdomain
pnp
power power: supply: WQ_PERCPU added to alloc_workqueue users 2025-09-09 00:53:46 +02:00
powercap
pps
ps3
ptp ptp: prevent possible ABBA deadlock in ptp_clock_freerun() 2025-08-12 14:17:35 -07:00
pwm treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
rapidio
ras
regulator regulator: tps65219: regulator: tps65219: Fix error codes in probe() 2025-08-19 16:51:03 +01:00
remoteproc remoteproc updates for v6.17 2025-08-01 15:02:25 -07:00
reset This is the usual collection of primarily clk driver updates. The big part of 2025-07-31 13:36:27 -07:00
rpmsg remoteproc updates for v6.17 2025-08-01 15:02:25 -07:00
rtc RTC for 6.17 2025-08-03 20:17:34 -07:00
s390 s390/sclp: Fix SCCB present check 2025-08-20 16:37:27 +02:00
sbus
scsi scsi: qla4xxx: Prevent a potential error pointer dereference 2025-08-14 23:22:46 -04:00
sh
siox
slimbus
soc soc/tegra: pmc: Ensure power-domains are in a known state 2025-08-11 12:24:43 +02:00
soundwire soundwire updates for 6.17 2025-08-01 11:09:27 -07:00
spi spi: Fixes for v6.17 2025-08-21 16:28:00 -04:00
spmi
ssb treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
staging treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
target SCSI misc on 20250806 2025-08-06 15:44:25 +03:00
tc
tee
thermal
thunderbolt
tty module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES 2025-08-11 16:16:36 +02:00
ufs scsi: ufs: ufs-qcom: Fix ESI null pointer dereference 2025-08-18 22:25:52 -04:00
uio
usb usb: xhci: fix host not responding after suspend and resume 2025-08-19 16:12:13 +02:00
vdpa vdpa: Fix IDR memory leak in VDUSE module exit 2025-08-01 09:11:08 -04:00
vfio VFIO updates for v6.17-rc1 v2 2025-08-07 07:32:50 +03:00
vhost vhost: initialize vq->nheads properly 2025-08-05 05:57:40 -04:00
video gpio updates for v6.17-rc1 2025-08-09 08:15:43 +03:00
virt virt: sev-guest: Satisfy linear mapping requirement in get_derived_key() 2025-08-15 17:05:39 +02:00
virtio virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
w1
watchdog
xen drivers/xen/xenbus: remove quirk for Xen 3.x 2025-08-20 15:47:43 +02:00
zorro
Kconfig drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
Makefile