]> git.ipfire.org Git - thirdparty/linux.git/commit
workqueue: Add stall detector sample module
authorBreno Leitao <leitao@debian.org>
Thu, 5 Mar 2026 16:15:41 +0000 (08:15 -0800)
committerTejun Heo <tj@kernel.org>
Thu, 5 Mar 2026 17:30:49 +0000 (07:30 -1000)
commit9e83d5104a70d8545bad61a77e166190d9447e1d
tree586c4285b68fd3f14c21165de5f38bc4b3304f5e
parent8823eaef45da7f156a1396f40d53b985c511edef
workqueue: Add stall detector sample module

Add a sample module under samples/workqueue/stall_detector/ that
reproduces a workqueue stall caused by PF_WQ_WORKER misuse.  The
module queues two work items on the same per-CPU pool, then clears
PF_WQ_WORKER and sleeps in wait_event_idle(), hiding from the
concurrency manager and stalling the second work item indefinitely.

This is useful for testing the workqueue watchdog stall diagnostics.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
samples/workqueue/stall_detector/Makefile [new file with mode: 0644]
samples/workqueue/stall_detector/wq_stall.c [new file with mode: 0644]