BACKPORT: FROMLIST: 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: Jan Kara <jack@suse.cz> Cc: Yu Kuai <yukuai3@huawei.com> Cc: Paolo Valente <paolo.valente@unimore.it> Signed-off-by: Bart Van Assche <bvanassche@acm.org> [ bvanassche: Left out the blk_stat_disable_accounting() call since ] [ commit 68497092bde9 ("block: make queue stat accounting a ] [ reference") from kernel v5.17 has not been backported to the ] [ android13-5.15 branch. ] Bug: 235453574 Link: https://lore.kernel.org/linux-block/20220613163234.3593026-1-bvanassche@acm.org/T/#u Change-Id: I5fad0fb3c7e9c6007aadd94ebb73d91c41143549 Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
parent
933eddd126
commit
56b51fac38
|
@ -132,6 +132,7 @@
|
|||
#include "blk-mq-tag.h"
|
||||
#include "blk-mq-sched.h"
|
||||
#include "bfq-iosched.h"
|
||||
#include "blk-stat.h"
|
||||
#include "blk-wbt.h"
|
||||
|
||||
#define BFQ_BFQQ_FNS(name) \
|
||||
|
@ -7032,6 +7033,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:
|
||||
|
|
Loading…
Reference in New Issue