]> git.ipfire.org Git - thirdparty/linux.git/commit
workqueue: Show all busy workers in stall diagnostics
authorBreno Leitao <leitao@debian.org>
Thu, 5 Mar 2026 16:15:40 +0000 (08:15 -0800)
committerTejun Heo <tj@kernel.org>
Thu, 5 Mar 2026 17:30:11 +0000 (07:30 -1000)
commit8823eaef45da7f156a1396f40d53b985c511edef
treef9d22f2233198135e136030300be0a8eb3d8b581
parente8e14ac7cfe437b896838e7f7d07c573965b4e4e
workqueue: Show all busy workers in stall diagnostics

show_cpu_pool_hog() only prints workers whose task is currently running
on the CPU (task_is_running()).  This misses workers that are busy
processing a work item but are sleeping or blocked — for example, a
worker that clears PF_WQ_WORKER and enters wait_event_idle().  Such a
worker still occupies a pool slot and prevents progress, yet produces
an empty backtrace section in the watchdog output.

This is happening on real arm64 systems, where
toggle_allocation_gate() IPIs every single CPU in the machine (which
lacks NMI), causing workqueue stalls that show empty backtraces because
toggle_allocation_gate() is sleeping in wait_event_idle().

Remove the task_is_running() filter so every in-flight worker in the
pool's busy_hash is dumped.  The busy_hash is protected by pool->lock,
which is already held.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c