aboutsummaryrefslogtreecommitdiff
path: root/block/blk-mq-sysfs.c
diff options
context:
space:
mode:
authorJens Axboe2016-09-16 13:59:14 -0600
committerJens Axboe2016-09-16 14:03:04 -0600
commit703fd1c0f177219e3a84e6c095c31dc566514d81 (patch)
tree468875ddeecad8922369359e863e100d061995ef /block/blk-mq-sysfs.c
parent2849450ad39d2e699fda2d5c6f41e05d87fd7004 (diff)
blk-mq: account higher order dispatch
We currently account a '0' dispatch, and anything above that still falls below the range set by BLK_MQ_MAX_DISPATCH_ORDER. If we dispatch more, we don't account it. Change the last bucket to be inclusive of anything above the range we track, and have the sysfs file reflect that by including a '+' in the output: $ cat /sys/block/nvme0n1/mq/0/dispatched 0 1006 1 20229 2 1 4 0 8 0 16 0 32+ 0 Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk-mq-sysfs.c')
-rw-r--r--block/blk-mq-sysfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index ac5160eb6862..3c385b196bc7 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -208,12 +208,14 @@ static ssize_t blk_mq_hw_sysfs_dispatched_show(struct blk_mq_hw_ctx *hctx,
page += sprintf(page, "%8u\t%lu\n", 0U, hctx->dispatched[0]);
- for (i = 1; i < BLK_MQ_MAX_DISPATCH_ORDER; i++) {
- unsigned long d = 1U << (i - 1);
+ for (i = 1; i < BLK_MQ_MAX_DISPATCH_ORDER - 1; i++) {
+ unsigned int d = 1U << (i - 1);
- page += sprintf(page, "%8lu\t%lu\n", d, hctx->dispatched[i]);
+ page += sprintf(page, "%8u\t%lu\n", d, hctx->dispatched[i]);
}
+ page += sprintf(page, "%8u+\t%lu\n", 1U << (i - 1),
+ hctx->dispatched[i]);
return page - start_page;
}