[PATCH 0/2] tools/workqueue/wq_dump.py: Backward compatibility and live worker inspection

From: Aaron Tomlin

Date: Mon Aug 31 2026 - 18:24:44 EST


Hi Tejun, Breno,

The Drgn program wq_dump.py is used to inspect workqueue configurations,
affinity scopes, and pool associations. However, it currently focuses on
static topology and lacks visibility into live, in-flight work items and
transient pool states. Furthermore, recent refactoring broke compatibility
when running against older kernels.

This 2-part series addresses these limitations:

Patch 1 introduces a wq_attrs() helper to support both older and newer
kernel versions seamlessly.

Patch 2 provides live busy worker inspection (via option -b|--busy). It
iterates through each pool's busy_hash table to dump active worker PIDs,
command names, workqueues, callback function symbols, descriptions, and
elapsed durations.

Feedback and comments are welcome.

Aaron Tomlin (2):
tools/workqueue/wq_dump.py: Support backward compatibility for
wq->attrs rename
tools/workqueue/wq_dump.py: Add busy worker inspection and BH pool
states

tools/workqueue/wq_dump.py | 60 ++++++++++++++++++++++++++++++++++----
1 file changed, 55 insertions(+), 5 deletions(-)

--
2.55.0