block/bfq: Enable I/O statistics
Subsystems (2)
PATCH 1/1 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.
--- block/bfq-iosched.c | 3 +++ 1 file changed, 3 insertions(+)
block/bfq-iosched.c +3 -0
@@ -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);
@@ -7189,6 +7190,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)bfq_init_entity (&bfqd->oom_bfqq.entity, bfqd->root_group);wbt_disable_default (q); +blk_stat_enable_accounting (q); +return 0 ; out_free:
Quoted 4 lines · Bart Van Assche
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.
Quoted 8 lines
Compile-tested only.
Reported-by Cixi Geng <[email protected]>Cc Cixi Geng <[email protected]>Cc Jan Kara <[email protected]>Cc Yu Kuai <[email protected]>Cc Paolo Valente <[email protected]>Signed-off-by Bart Van Assche <[email protected]>
Looks good. Thanks for the fix. Feel free to add:
Honza
Quoted 25 lines
--- block/bfq-iosched.c | 3 +++ 1 file changed, 3 insertions(+)block/bfq-iosched.c +3
-0@@ -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);@@ -7189,6 +7190,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)bfq_init_entity (&bfqd->oom_bfqq.entity, bfqd->root_group);wbt_disable_default (q); +blk_stat_enable_accounting (q); +return 0 ; out_free:
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Jens Axboe
maintainerQuoted 5 lines · Bart Van Assche
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.
Have you runtime tested it now?
Signature · 1 line
Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 5 lines · Bart Van Assche
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.
Have you runtime tested it now?
This patch has been tested lightly: I ran blktests in a VM against a kernel that includes this patch. I'm not a BFQ expert so I was hoping for feedback from Paolo.
Thanks,
Bart.
Jens Axboe
maintainerQuoted 6 lines · Bart Van Assche
Quoted 5 lines · Jens Axboe
Quoted 4 lines · Bart Van Assche
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.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Compile-tested only.
Have you runtime tested it now?
This patch has been tested lightly: I ran blktests in a VM against a kernel that includes this patch. I'm not a BFQ expert so I was hoping for feedback from Paolo.
Sounds good - and Jan reviewed it, and I consider him the defactor BFQ maintainer anyway these days :-)
Signature · 1 line
Jens Axboe
Quoted 8 lines · Bart Van Assche
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.
[...]
Applied, thanks!
[1/1] block/bfq: Enable I/O statistics
(no commit info)
Best regards,
Signature · 1 line
Jens Axboe