]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
workqueue: Allow to expose ordered workqueues via sysfs
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 27 Feb 2026 17:01:02 +0000 (18:01 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 27 Feb 2026 18:21:18 +0000 (08:21 -1000)
commita4aa8d94f24317338cf6f62eb3267ad99a2ff7f7
treeaba98d806477ab0c1940e32c04d363cbe41afb1d
parent4a91a33f15c634fb3477d122bdf1eef098d77ee3
workqueue: Allow to expose ordered workqueues via sysfs

Ordered workqueues are not exposed via sysfs because the 'max_active'
attribute changes the number actives worker. More than one active worker
can break ordering guarantees.

This can be avoided by forbidding writes the file for ordered
workqueues. Exposing it via sysfs allows to alter other attributes such
as the cpumask on which CPU the worker can run.

The 'max_active' value shouldn't be changed for BH worker because the
core never spawns additional worker and the worker itself can not be
preempted. So this make no sense.

Allow to expose ordered workqueues via sysfs if requested and forbid
changing 'max_active' value for ordered and BH worker.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c