[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220922113558.1085314-4-yukuai3@huawei.com>
Date: Thu, 22 Sep 2022 19:35:56 +0800
From: Yu Kuai <yukuai3@...wei.com>
To: <jack@...e.cz>, <paolo.valente@...aro.org>, <axboe@...nel.dk>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yukuai3@...wei.com>, <yukuai1@...weicloud.com>,
<yi.zhang@...wei.com>
Subject: [PATCH v3 3/5] block, bfq: don't disable wbt if CONFIG_BFQ_GROUP_IOSCHED is disabled
wbt and bfq should work just fine if CONFIG_BFQ_GROUP_IOSCHED is disabled.
Signed-off-by: Yu Kuai <yukuai3@...wei.com>
---
block/bfq-iosched.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 7ea427817f7f..fec52968fe07 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -7037,6 +7037,7 @@ static void bfq_exit_queue(struct elevator_queue *e)
#ifdef CONFIG_BFQ_GROUP_IOSCHED
blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq);
+ wbt_enable_default(bfqd->queue);
#else
spin_lock_irq(&bfqd->lock);
bfq_put_async_queues(bfqd, bfqd->root_group);
@@ -7045,7 +7046,6 @@ static void bfq_exit_queue(struct elevator_queue *e)
#endif
blk_stat_disable_accounting(bfqd->queue);
- wbt_enable_default(bfqd->queue);
kfree(bfqd);
}
@@ -7190,7 +7190,9 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
/* We dispatch from request queue wide instead of hw queue */
blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q);
+#ifdef CONFIG_BFQ_GROUP_IOSCHED
wbt_disable_default(q);
+#endif
blk_stat_enable_accounting(q);
return 0;
--
2.31.1
Powered by blists - more mailing lists