milos-linux/drivers
Martin K. Petersen e360bb6dc8 Merge patch series "replace old wq(s), added WQ_PERCPU to alloc_workqueue"
Marco Crivellari <marco.crivellari@suse.com> says:

Hi,

=== 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 consistency cannot be addressed without refactoring the API.

=== Recent changes to the WQ API ===

The following, address the recent changes in the Workqueue API:

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

The old workqueues will be removed in a future release cycle.

=== Introduced Changes by this series ===

1) [P 1]  Replace uses of system_wq and system_unbound_wq

    system_unbound_wq is to be used when locality is not required.

    Because of that, system_unbound_wq has been replaced with
	system_dfl_wq, to make clear it should be used when locality
	is not required.

2) [P 2-3-4] WQ_PERCPU added to alloc_workqueue()

    This change adds a new WQ_PERCPU flag to explicitly request
    alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified.

Thanks!

Link: https://patch.msgid.link/20251031095643.74246-1-marco.crivellari@suse.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-12 21:30:23 -05:00
..
accel
accessibility
acpi More ACPI support updates for 6.18-rc1 2025-10-07 09:45:07 -07:00
amba
android
ata scsi: ata: Stop disk on restart if ACPI power resources are found 2025-11-08 13:24:56 -05: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
cache
cdrom
cdx
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
dma-buf
dpll
edac
eisa
extcon
firewire
firmware scsi: firmware: xilinx: Add APIs for UFS PHY initialization 2025-10-29 23:00:48 -04: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
i2c Revert "i2c: boardinfo: Annotate code used in init phase only" 2025-10-11 23:57:33 +02:00
i3c
idle
iio
infiniband
input Input updates for v6.18-rc0 2025-10-08 09:44:38 -07:00
interconnect
iommu
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
media
memory
memstick
message scsi: message: fusion: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:26 -05:00
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
mux
net Including fixes from netfilter. 2025-10-09 11:13:08 -07:00
nfc
ntb
nubus
nvdimm
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
pinctrl
platform
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
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 Merge patch series "replace old wq(s), added WQ_PERCPU to alloc_workqueue" 2025-11-12 21:30:23 -05:00
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging Staging driver fixes for 6.18-rc1 2025-10-07 11:41:06 -07:00
target Merge patch series "replace old wq(s), added WQ_PERCPU to alloc_workqueue" 2025-11-12 21:30:23 -05:00
tc
tee
thermal
thunderbolt
tty TTY driver fix for 6.18-rc1 2025-10-07 11:36:01 -07:00
ufs scsi: ufs: core: Remove an unnecessary NULL pointer check 2025-11-12 20:58:28 -05:00
uio hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
usb
vdpa
vfio
vhost
video fbdev fixes & enhancements for 6.18-rc1: 2025-10-10 09:36:23 -07:00
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile hyperv-next for v6.18 2025-10-07 08:40:15 -07:00