linux/drivers/input/mouse
Marco Crivellari b72fbdc080 Input: psmouse-smbus - add WQ_UNBOUND to alloc_workqueue user
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 patch continues the effort to refactor worqueue APIs, which has begun
with the change introducing new workqueues and a new alloc_workqueue flag:

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

This specific workload do not benefit from a per-cpu workqueue, so use
WQ_UNBOUND on the custom workqueue instead.

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/20251106141955.218911-5-marco.crivellari@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-18 20:53:31 -08:00
..
alps.c Input updates for v6.16-rc4 2025-07-04 09:54:15 -07:00
alps.h
amimouse.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
appletouch.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
atarimouse.c
bcm5974.c Input: bcm5974 - use guard notation when acquiring mutex 2024-08-29 11:00:21 -07:00
byd.c Input: byd - use %*ph for Z packet dump 2025-12-08 23:14:29 -08:00
byd.h
cyapa_gen3.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cyapa_gen5.c Input: cyapa - remove redundant pm_runtime_mark_last_busy() calls 2025-12-13 01:23:01 -08:00
cyapa_gen6.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cyapa.c Input: cyapa - remove redundant pm_runtime_mark_last_busy() calls 2025-12-13 01:23:01 -08:00
cyapa.h
cypress_ps2.c Input: cypress_ps2 - fix waiting for command response 2024-08-29 10:46:17 -07:00
cypress_ps2.h Input: cypress_ps2 - fix error handling when sending command fails 2024-07-03 13:48:53 -07:00
elan_i2c_core.c Input: Use str_enable_disable-like helpers 2025-01-14 13:41:41 -08:00
elan_i2c_i2c.c Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
elan_i2c_smbus.c
elan_i2c.h
elantech.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
elantech.h
focaltech.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
focaltech.h
gpio_mouse.c Input: gpio_mouse - fix typos in comments 2022-06-22 15:29:35 -07:00
hgpk.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
hgpk.h
inport.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
Kconfig Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
lifebook.c Input: lifebook - switch to use scnprintf() to suppress truncation warning 2025-06-03 21:51:27 -07:00
lifebook.h
logibm.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
logips2pp.c
logips2pp.h
Makefile Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
maplemouse.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
pc110pad.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
psmouse-base.c Input: psmouse - switch to use scnprintf() to suppress truncation warning 2025-06-03 21:51:28 -07:00
psmouse-smbus.c Input: psmouse-smbus - add WQ_UNBOUND to alloc_workqueue user 2025-12-18 20:53:31 -08:00
psmouse.h Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
rpcmouse.c
sentelic.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
sentelic.h
sermouse.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00
synaptics_i2c.c Input: synaptics_i2c - replace use of system_wq with system_dfl_wq 2025-12-18 20:53:14 -08:00
synaptics_usb.c Input: move from strlcpy with unused retval to strscpy 2022-08-18 15:44:08 -07:00
synaptics.c Input: synaptics - enable InterTouch on Dell Precision M3800 2025-05-07 14:56:05 -07:00
synaptics.h Input: synaptics - fix crash when enabling pass-through port 2025-01-20 21:27:02 -08:00
touchkit_ps2.c
touchkit_ps2.h
trackpoint.c Input: libps2 - attach ps2dev instances as serio port's drvdata 2023-05-18 11:40:32 -07:00
trackpoint.h
vmmouse.c input/vmmouse: Use VMware hypercall API 2024-06-25 17:15:47 +02:00
vmmouse.h
vsxxxaa.c Input: mouse - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:02 -07:00