summaryrefslogtreecommitdiffstats
path: root/block/blk-stat.c
Commit message (Collapse)AuthorAgeFilesLines
* blk-stat: fix blk_stat_sum() if all samples are batchedOmar Sandoval2017-03-161-2/+2
| | | | | | | | | We need to flush the batch _before_ we check the number of samples, otherwise we'll miss all of the batched samples. Fixes: cf43e6b ("block: add scalable completion tracking of requests") Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
* blk-stat: fix a few cases of missing batch flushingJens Axboe2016-12-091-0/+8
| | | | | | | | Everytime we need to read ->nr_samples, we should have flushed the batch first. The non-mq read path also needs to flush the batch. Signed-off-by: Jens Axboe <axboe@fb.com>
* blk-stat: fix a typoShaohua Li2016-12-021-1/+1
| | | | | | Signed-off-by: Shaohua Li <shli@fb.com> Fixes: cf43e6be865a ("block: add scalable completion tracking of requests") Signed-off-by: Jens Axboe <axboe@fb.com>
* block: add scalable completion tracking of requestsJens Axboe2016-11-101-0/+248
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>
OpenPOWER on IntegriCloud