Skip to content

Commit b96f3ca

Browse files
bvanasscheaxboe
authored andcommitted
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 <[email protected]> Cc: Cixi Geng <[email protected]> Cc: Yu Kuai <[email protected]> Cc: Paolo Valente <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 6cfeadb commit b96f3ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

block/bfq-iosched.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7046,6 +7046,7 @@ static void bfq_exit_queue(struct elevator_queue *e)
70467046
spin_unlock_irq(&bfqd->lock);
70477047
#endif
70487048

7049+
blk_stat_disable_accounting(bfqd->queue);
70497050
wbt_enable_default(bfqd->queue);
70507051

70517052
kfree(bfqd);
@@ -7192,6 +7193,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
71927193
blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q);
71937194

71947195
wbt_disable_default(q);
7196+
blk_stat_enable_accounting(q);
7197+
71957198
return 0;
71967199

71977200
out_free:

0 commit comments

Comments
 (0)