diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-11 13:13:32 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-11 13:13:32 -0800 |
| commit | 9bdc64892dcce732d55b2c07d80b36a6c3e1b5f4 (patch) | |
| tree | a78a25aefaa12c7c585eb623bb8bc243c75e1dc6 /lib | |
| parent | 1e83ccd5921a610ef409a7d4e56db27822b4ea39 (diff) | |
| parent | 9cb8b0f289560728dbb8b88158e7a957e2e90a14 (diff) | |
Merge tag 'wq-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue updates from Tejun Heo:
- Rework the rescuer to process work items one-by-one instead of
slurping all pending work items in a single pass.
As there is only one rescuer per workqueue, a single long-blocking
work item could cause high latency for all tasks queued behind it,
even after memory pressure is relieved and regular kworkers become
available to service them.
- Add CONFIG_BOOTPARAM_WQ_STALL_PANIC build-time option and
workqueue.panic_on_stall_time parameter for time-based stall panic,
giving systems more control over workqueue stall handling.
- Replace BUG_ON() with panic() in the stall panic path for clearer
intent and more informative output.
* tag 'wq-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: replace BUG_ON with panic in panic_on_wq_watchdog
workqueue: add time-based panic for stalls
workqueue: add CONFIG_BOOTPARAM_WQ_STALL_PANIC option
workqueue: Process extra works in rescuer on memory pressure
workqueue: Process rescuer work items one-by-one using a cursor
workqueue: Make send_mayday() take a PWQ argument directly
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index c82155318cae..e03992d8fad4 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1322,6 +1322,29 @@ config WQ_WATCHDOG state. This can be configured through kernel parameter "workqueue.watchdog_thresh" and its sysfs counterpart. +config BOOTPARAM_WQ_STALL_PANIC + int "Panic on Nth workqueue stall" + default 0 + range 0 100 + depends on WQ_WATCHDOG + help + Set the number of workqueue stalls to trigger a kernel panic. + A workqueue stall occurs when a worker pool doesn't make forward + progress on a pending work item for over 30 seconds (configurable + using the workqueue.watchdog_thresh parameter). + + If n = 0, the kernel will not panic on stall. If n > 0, the kernel + will panic after n stall warnings. + + The panic can be used in combination with panic_timeout, + to cause the system to reboot automatically after a + stall has been detected. This feature is useful for + high-availability systems that have uptime guarantees and + where a stall must be resolved ASAP. + + This setting can be overridden at runtime via the + workqueue.panic_on_stall kernel parameter. + config WQ_CPU_INTENSIVE_REPORT bool "Report per-cpu work items which hog CPU for too long" depends on DEBUG_KERNEL |
