]> git.baikalelectronics.ru Git - kernel.git/commit
block: add scalable completion tracking of requests
authorJens Axboe <axboe@fb.com>
Tue, 8 Nov 2016 04:32:37 +0000 (21:32 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 10 Nov 2016 20:53:26 +0000 (13:53 -0700)
commit29d9e75af8aad636442db676a6ec4f5de2f605be
tree53b71dd2f456e4880428683631fd09c9dc0747a5
parent32598251bff2d0f0d58c9ce488189d01f29b7a07
block: add scalable completion tracking of requests

For legacy block, we simply track them in the request queue. For
blk-mq, we track them on a per-sw queue basis, which we can then
sum up through the hardware queues and finally to a per device
state.

The stats are tracked in, roughly, 0.1s interval windows.

Add sysfs files to display the stats.

The feature is off by default, to avoid any extra overhead. In-kernel
users of it can turn it on by setting QUEUE_FLAG_STATS in the queue
flags. We currently don't turn it on if someone just reads any of
the stats files, that is something we could add as well.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/Makefile
block/blk-core.c
block/blk-mq-sysfs.c
block/blk-mq.c
block/blk-mq.h
block/blk-stat.c [new file with mode: 0644]
block/blk-stat.h [new file with mode: 0644]
block/blk-sysfs.c
include/linux/blk_types.h
include/linux/blkdev.h