Skip to content

workqueue: expose per-workqueue stats in debugfs

Wilson Felipe Pereira linux-doc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3workqueue: preserve pwq->stats[] when unbound pwqs are releasedkernel/workqueue.c+6 -00 replies
2/3workqueue: expose per-workqueue stats in debugfskernel/workqueue.c+99 -05 replies
3/3tools/workqueue: report queued items and retired stats in wq_monitor.pyDocumentation/core-api/workqueue.rst tools/workqueue/wq_monitor.py+50 -210 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] workqueue: expose per-workqueue stats in debugfs

struct pool_workqueue already tracks runtime counters in pwq->stats[], pwq->total_in_flight, and pwq->nr_active, but reading them currently requires tools/workqueue/wq_monitor.py with drgn and kernel DWARF debuginfo.

This series:
- Preserves pwq->stats[] in wq->retired_stats[] when unbound pwqs are released so cumulative per-workqueue counters do not go backwards.
- Exposes per-workqueue stats via /sys/kernel/debug/workqueue/stats so they can be read directly on systems without drgn or debuginfo.
- Updates wq_monitor.py to include wq->retired_stats[] and report a 'queued' column alongside 'infl'.

Wilson Felipe Pereira (3):
workqueue: preserve pwq->stats[] when unbound pwqs are released
workqueue: expose per-workqueue stats in debugfs tools/workqueue: report queued items and retired stats in
wq_monitor.py

 Documentation/core-api/workqueue.rst |  47 +++++++-----
 kernel/workqueue.c                   | 105 +++++++++++++++++++++++++++
 tools/workqueue/wq_monitor.py        |  24 +++++-
 3 files changed, 155 insertions(+), 21 deletions(-)
Signature · 1 line
2.56.0.218.g1ec904b173-goog