Currently, crash doesn't support to display disk I/O statistics
for blk-mq devices. The patchset will implement it by parsing
the bitmap, it includes two patches:
[1] [PATCH 1/2] Support for "dev -d|-D" options by parsing bitmap in
blk-mq layer
[2] [PATCH 2/2] Fix for "dev -d|-D" options to correctly display disk I/O
statistics on linux v5.18-rc1
Related kernel commits:
[1] commit <9a14d6ce4135> ("block: remove debugfs blk_mq_ctx
dispatched/merged/completed attributes")
[2] commit <4e5cc99e1e48> ("blk-mq: manage hctx map via xarray")
The patchset is tested on v5.17.0-rc8 and the latest kernel 5.18.0-rc4.
With the patchset:
crash> dev -d
MAJOR GENDISK NAME REQUEST_QUEUE TOTAL ASYNC SYNC
8 ffff93d2ca593400 sda ffff93d2c917b960 18 15 3
Changes since v2:
[1] Remove the static_rqs[] and sched_tags to exactly follow up the
kernel path
[2] Add checking if the status of rq is inflight
[3] Use TRUE/FALSE for readability
[4] Replace "if MEMBER_EXISTS()" with "if VALID_MEMBER"
[5] Align it with the colons
Lianbo Jiang (2):
Support for "dev -d|-D" options by parsing bitmap in blk-mq layer
Fix for "dev -d|-D" options to correctly display disk I/O statistics
on linux v5.18-rc1
defs.h | 12 +++
dev.c | 285 ++++++++++++++++++++++++++++++++++++++++++++++--------
symbols.c | 24 +++++
3 files changed, 282 insertions(+), 39 deletions(-)
--
2.20.1