block: Track DISCARD statistics and output them in stat and diskstat
Add tracking of REQ_OP_DISCARD ios to the partition statistics and append them to the various stat files in /sys as well as /proc/diskstats. These are tracked with the same four stats as reads and writes: Number of discard ios completed. Number of discard ios merged Number of discard sectors completed Milliseconds spent on discard requests This is done via adding a new STAT_DISCARD define to genhd.h and then using it to index that stat field for discard requests. tj: Refreshed on top of v4.17 and other previous updates. Signed-off-by:Michael Callahan <michaelcallahan@fb.com> Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Andy Newell <newella@fb.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- Documentation/ABI/testing/procfs-diskstats 10 additions, 0 deletionsDocumentation/ABI/testing/procfs-diskstats
- Documentation/block/stat.txt 16 additions, 12 deletionsDocumentation/block/stat.txt
- Documentation/iostats.txt 15 additions, 0 deletionsDocumentation/iostats.txt
- block/genhd.c 10 additions, 3 deletionsblock/genhd.c
- block/partition-generic.c 7 additions, 2 deletionsblock/partition-generic.c
- include/linux/blk_types.h 8 additions, 0 deletionsinclude/linux/blk_types.h
- include/linux/genhd.h 2 additions, 1 deletioninclude/linux/genhd.h
Loading
Please register or sign in to comment