summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2023-04-28 09:44:04 +0200
committerJens Axboe <axboe@kernel.dk>2023-06-07 06:26:26 +0200
commitddf63516d8d37528dc6834c7f19b55084e956068 (patch)
tree600482397970b7ed54dcc4aff4b25f206126dee3 /drivers/block
parentblk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost (diff)
downloadlinux-ddf63516d8d37528dc6834c7f19b55084e956068.tar.xz
linux-ddf63516d8d37528dc6834c7f19b55084e956068.zip
blk-ioprio: Introduce promote-to-rt policy
Since commit a78418e6a04c ("block: Always initialize bio IO priority on submit"), bio->bi_ioprio will never be IOPRIO_CLASS_NONE when calling blkcg_set_ioprio(), so there will be no way to promote the io-priority of one cgroup to IOPRIO_CLASS_RT, because bi_ioprio will always be greater than or equals to IOPRIO_CLASS_RT. It seems possible to call blkcg_set_ioprio() first then try to initialize bi_ioprio later in bio_set_ioprio(), but this doesn't work for bio in which bi_ioprio is already initialized (e.g., direct-io), so introduce a new promote-to-rt policy to promote the iopriority of bio to IOPRIO_CLASS_RT if the ioprio is not already RT. For none-to-rt policy, although it doesn't work now, but considering that its purpose was also to override the io-priority to RT and allowing for a smoother transition, just keep it and treat it as an alias of the promote-to-rt policy. Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Hou Tao <houtao1@huawei.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20230428074404.280532-1-houtao@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions