Skip to content

tools/workqueue/wq_dump.py: Backward compatibility and live worker inspection

Aaron Tomlin lkml 1 version Applied

Status from this message: Applied to wq/for-7.3-fixes.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2tools/workqueue/wq_dump.py: Support backward compatibility for wq->attrs renametools/workqueue/wq_dump.py+8 -21 reply
2/2tools/workqueue/wq_dump.py: Add busy worker inspection and BH pool statestools/workqueue/wq_dump.py+47 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.55.0