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

Aaron Tomlin posted 2 patches 3 weeks, 4 days ago
tools/workqueue/wq_dump.py | 60 ++++++++++++++++++++++++++++++++++----
1 file changed, 55 insertions(+), 5 deletions(-)
[PATCH 0/2] tools/workqueue/wq_dump.py: Backward compatibility and live worker inspection
Posted by Aaron Tomlin 3 weeks, 4 days ago
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