blk-iocost: disable writeback throttling
authorYu Kuai <yukuai3@huawei.com>
Wed, 12 Oct 2022 09:40:32 +0000 (17:40 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Oct 2022 00:59:16 +0000 (18:59 -0600)
Commit b5dc5d4d1f4f ("block,bfq: Disable writeback throttling") disable
wbt for bfq, because different write-throttling heuristics should not
work together.

For the same reason, wbt and iocost should not work together as well,
unless admin really want to do that, dispite that performance is
affected.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20221012094035.390056-2-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c

index 495396425bade019ff8f26564b62d4949903cea9..08036476e6fa25815d40f9f5eed02b6735e4c17f 100644 (file)
@@ -3264,9 +3264,11 @@ static ssize_t ioc_qos_write(struct kernfs_open_file *of, char *input,
                blk_stat_enable_accounting(disk->queue);
                blk_queue_flag_set(QUEUE_FLAG_RQ_ALLOC_TIME, disk->queue);
                ioc->enabled = true;
+               wbt_disable_default(disk->queue);
        } else {
                blk_queue_flag_clear(QUEUE_FLAG_RQ_ALLOC_TIME, disk->queue);
                ioc->enabled = false;
+               wbt_enable_default(disk->queue);
        }
 
        if (user) {