summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-06-13 18:32:34 +0200
committerJens Axboe <axboe@kernel.dk>2022-06-17 00:59:28 +0200
commitb96f3cab59654ee2c30e6adf0b1c13cf8c0850fa (patch)
treedbd7258d97189a31131ca85dcdd230ae6f35046a /block
parentblk-mq: don't clear flush_rq from tags->rqs[] (diff)
downloadlinux-b96f3cab59654ee2c30e6adf0b1c13cf8c0850fa.tar.xz
linux-b96f3cab59654ee2c30e6adf0b1c13cf8c0850fa.zip
block/bfq: Enable I/O statistics
BFQ uses io_start_time_ns. That member variable is only set if I/O statistics are enabled. Hence this patch that enables I/O statistics at the time BFQ is associated with a request queue. Compile-tested only. Reported-by: Cixi Geng <cixi.geng1@unisoc.com> Cc: Cixi Geng <cixi.geng1@unisoc.com> Cc: Yu Kuai <yukuai3@huawei.com> Cc: Paolo Valente <paolo.valente@unimore.it> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/bfq-iosched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index caa55a5624bc..e6d7e6b01a05 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -7046,6 +7046,7 @@ static void bfq_exit_queue(struct elevator_queue *e)
spin_unlock_irq(&bfqd->lock);
#endif
+ blk_stat_disable_accounting(bfqd->queue);
wbt_enable_default(bfqd->queue);
kfree(bfqd);
@@ -7192,6 +7193,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q);
wbt_disable_default(q);
+ blk_stat_enable_accounting(q);
+
return 0;
out_free: