Skip to content

block: callback-based statistics

Omar Sandoval linux-block 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v14 patches 1 replySuperseded

Changes in v2 from the cover letter

- Now the user can subdivide stats into arbitrary buckets. Both in-tree users just do reads vs. writes, but we can extend poll based on request size in the future
- blk_stat_arm_callback() became blk_stat_activate_msecs() and blk_stat_activate_nsecs()
- The poll statistics are exposed in debugfs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4block: remove extra calls to wbt_exit()block/blk-core.c block/blk-mq.c+0 -30 replies
2/4blk-stat: use READ and WRITE instead of BLK_STAT_{READ,WRITE}block/blk-mq-debugfs.c block/blk-mq.c block/blk-stat.c +3 more+59 -660 replies
3/4blk-stat: move BLK_RQ_STAT_BATCH definition to blk-stat.cblock/blk-stat.c include/linux/blk_types.h+2 -20 replies
4/4blk-stat: convert to callback-based statistics reportingblock/blk-core.c block/blk-mq-debugfs.c block/blk-mq.c +8 more+449 -3200 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] block: callback-based statistics

From: Omar Sandoval <[email protected]>

This patchset generalizes the blk-stats infrastructure to allow users to register a callback to be called at a given time with the statistics of requests completed during that window. Writeback throttling and hybrid polling are converted to the new infrastructure. The new Kyber I/O scheduler uses this, as well (but it needs to be rebased on this v2).

The details are in patch 4, which is the actual conversion. Patches 1-3 are preparation cleanups.

Changes since v1:

- Now the user can subdivide stats into arbitrary buckets. Both in-tree users just do reads vs. writes, but we can extend poll based on request size in the future
- blk_stat_arm_callback() became blk_stat_activate_msecs() and blk_stat_activate_nsecs()
- The poll statistics are exposed in debugfs

Omar Sandoval (4):
block: remove extra calls to wbt_exit()
blk-stat: use READ and WRITE instead of BLK_STAT_{READ,WRITE}
blk-stat: move BLK_RQ_STAT_BATCH definition to blk-stat.c
blk-stat: convert to callback-based statistics reporting

 block/blk-core.c          |   7 +-
 block/blk-mq-debugfs.c    |  99 +++++++--------
 block/blk-mq.c            |  78 ++++++++----
 block/blk-mq.h            |   1 -
 block/blk-stat.c          | 315 ++++++++++++++++++++++------------------------
 block/blk-stat.h          | 182 ++++++++++++++++++++++++---
 block/blk-sysfs.c         |  31 +----
 block/blk-wbt.c           |  61 ++++-----
 block/blk-wbt.h           |   2 +-
 include/linux/blk_types.h |   3 -
 include/linux/blkdev.h    |  10 +-
 11 files changed, 454 insertions(+), 335 deletions(-)
Signature · 1 line
2.12.0