linux/drivers/input
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
..
gameport Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
joystick Merge branch 'next' into for-linus 2025-10-07 21:53:13 -07:00
keyboard Input: gpio_keys - replace use of system_wq with system_dfl_wq 2025-12-18 20:52:47 -08:00
misc Input: palmas-pwrbutton - replace use of system_wq with system_dfl_wq 2025-12-18 20:52:48 -08:00
mouse Input: psmouse-smbus - add WQ_UNBOUND to alloc_workqueue user 2025-12-18 20:53:31 -08:00
rmi4 Input: synaptics-rmi4 - add includes for types used in rmi_2d_sensor.h 2025-09-08 06:39:41 -07:00
serio Input updates for v6.18-rc0 2025-10-08 09:44:38 -07:00
tablet Input: pegasus-notetaker - fix potential out-of-bounds access 2025-10-17 18:04:15 -07:00
tests
touchscreen Input: stmfts - use sysfs_emit() instead of sprintf() 2025-12-15 21:57:02 -08:00
Kconfig
Makefile
apm-power.c
evdev.c
ff-core.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
ff-memless.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
input-compat.c Input: move input_bits_to_string() to input-compat.c 2025-08-21 12:00:58 -07:00
input-compat.h Input: move input_bits_to_string() to input-compat.c 2025-08-21 12:00:58 -07:00
input-core-private.h
input-leds.c
input-mt.c Input: MT - add INPUT_MT_TOTAL_FORCE flags 2025-09-15 14:32:55 +02:00
input-poller.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
input-poller.h
input.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
joydev.c
matrix-keymap.c
mousedev.c
sparse-keymap.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
touch-overlay.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
touchscreen.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
vivaldi-fmap.c