]> git.baikalelectronics.ru Git - kernel.git/commit
block: add iostat counters for flush requests
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Thu, 21 Nov 2019 10:40:26 +0000 (13:40 +0300)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Nov 2019 16:06:47 +0000 (09:06 -0700)
commita233b3e71a79de5757f2e747814a8d9dbab2e485
treef4d534373b711f368f079d0cc54d3d71892e1feb
parent751adccbc9cf45aec7bf0f0182964fc9dbb0b46f
block: add iostat counters for flush requests

Requests that triggers flushing volatile writeback cache to disk (barriers)
have significant effect to overall performance.

Block layer has sophisticated engine for combining several flush requests
into one. But there is no statistics for actual flushes executed by disk.
Requests which trigger flushes usually are barriers - zero-size writes.

This patch adds two iostat counters into /sys/class/block/$dev/stat and
/proc/diskstats - count of completed flush requests and their total time.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/ABI/testing/procfs-diskstats
Documentation/ABI/testing/sysfs-block
Documentation/admin-guide/iostats.rst
Documentation/block/stat.rst
block/blk-flush.c
block/genhd.c
block/partition-generic.c
include/linux/blk_types.h