[PATCH 0/3] workqueue: expose per-workqueue stats in debugfs
From: Wilson Felipe Pereira
Date: Thu Oct 22 2026 - 11:56:26 EST
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(-)
--
2.56.0.218.g1ec904b173-goog