summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sysfs.c
diff options
context:
space:
mode:
authorStephen Bates <sbates@raithlin.com>2016-09-13 12:23:15 -0600
committerJens Axboe <axboe@fb.com>2016-09-14 08:41:21 -0600
commit6e219353afa1f67f453141f7462b01708ebf5574 (patch)
treed09924891e887e970be9a18442bebc40d2ad64ee /block/blk-mq-sysfs.c
parent0eadf37afc2500e1162c9040ec26a705b9af8d47 (diff)
downloadlinux-0-day-6e219353afa1f67f453141f7462b01708ebf5574.tar.gz
linux-0-day-6e219353afa1f67f453141f7462b01708ebf5574.tar.xz
block: add poll_considered statistic
In order to help determine the effectiveness of polling in a running system it is usful to determine the ratio of how often the poll function is called vs how often the completion is checked. For this reason we add a poll_considered variable and add it to the sysfs entry for io_poll. Signed-off-by: Stephen Bates <sbates@raithlin.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sysfs.c')
-rw-r--r--block/blk-mq-sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index fe822aa5b8e4a..ea8c3f58afbdc 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -176,7 +176,9 @@ static ssize_t blk_mq_sysfs_rq_list_show(struct blk_mq_ctx *ctx, char *page)
static ssize_t blk_mq_hw_sysfs_poll_show(struct blk_mq_hw_ctx *hctx, char *page)
{
- return sprintf(page, "invoked=%lu, success=%lu\n", hctx->poll_invoked, hctx->poll_success);
+ return sprintf(page, "considered=%lu, invoked=%lu, success=%lu\n",
+ hctx->poll_considered, hctx->poll_invoked,
+ hctx->poll_success);
}
static ssize_t blk_mq_hw_sysfs_queued_show(struct blk_mq_hw_ctx *hctx,