Commit b96f3cab authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

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: default avatarCixi 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: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6cfeadbf
...@@ -7046,6 +7046,7 @@ static void bfq_exit_queue(struct elevator_queue *e) ...@@ -7046,6 +7046,7 @@ static void bfq_exit_queue(struct elevator_queue *e)
spin_unlock_irq(&bfqd->lock); spin_unlock_irq(&bfqd->lock);
#endif #endif
blk_stat_disable_accounting(bfqd->queue);
wbt_enable_default(bfqd->queue); wbt_enable_default(bfqd->queue);
kfree(bfqd); kfree(bfqd);
...@@ -7192,6 +7193,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) ...@@ -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); blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q);
wbt_disable_default(q); wbt_disable_default(q);
blk_stat_enable_accounting(q);
return 0; return 0;
out_free: out_free:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment