mbox series

[RFC,V2,0/6] blk: make blk-rq-qos policies pluggable and modular

Message ID 20220215123705.58968-1-jianchao.wan9@gmail.com (mailing list archive)
Headers show
Series blk: make blk-rq-qos policies pluggable and modular | expand

Message

Wang Jianchao Feb. 15, 2022, 12:36 p.m. UTC
Hi Jens

blk-rq-qos is a standalone framework out of io-sched and can be used to
control or observe the IO progress in block-layer with hooks. blk-rq-qos
is a great design but right now, it is totally fixed and built-in and shut
out peoples who want to use it with external module.

This patchset attempts to make blk-rq-qos framework pluggable and modular.
Then we can update the blk-rq-qos policy module w/o stopping the IO workload.
And it is more convenient to introduce new policy on old machines w/o udgrade
kernel. And we can close all of the blk-rq-qos policy if we needn't any of
them. At the moment, the request_queue.rqos list is empty, we needn't to
waste cpu cyles on them.

Changes since v1:
 - Just make iocost and iolatency pluggable, then we needn't to export
   those interfaces
 - Remove the iostat rqos policy
 - Rename module of blk-ioprio to io-prio to avoid rename ioprio.c file

WangJianchao(6):
	blk: make blk-rq-qos support pluggable and modular
    blk-wbt: make wbt pluggable
    blk-iolatency: make iolatency pluggable
    blk-iocost: make iocost pluggable
    blk-ioprio: make ioprio pluggable and modular
    blk: remove unused interfaces of blk-rq-qos

block/Kconfig          |   2 +-
 block/Makefile         |   3 +-
 block/blk-cgroup.c     |  11 ---
 block/blk-core.c       |   2 +
 block/blk-iocost.c     |  59 ++++++++------
 block/blk-iolatency.c  |  33 ++++++--
 block/blk-ioprio.c     |  50 +++++++-----
 block/blk-ioprio.h     |  19 -----
 block/blk-mq-debugfs.c |  18 +----
 block/blk-rq-qos.c     | 312 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 block/blk-rq-qos.h     | 104 +++++++++++--------------
 block/blk-sysfs.c      |   9 +--
 block/blk-wbt.c        |  36 +++++++--
 block/blk-wbt.h        |   8 +-
 block/blk.h            |   6 --
 block/elevator.c       |   3 +
 block/genhd.c          |   2 -
 include/linux/blkdev.h |   4 +
 18 files changed, 501 insertions(+), 180 deletions(-)

Comments

Chaitanya Kulkarni Feb. 15, 2022, 1:01 p.m. UTC | #1
Wang Jianchao (Kuaishou),

On 2/15/22 04:36, Wang Jianchao (Kuaishou) wrote:
> Hi Jens
> 
> blk-rq-qos is a standalone framework out of io-sched and can be used to
> control or observe the IO progress in block-layer with hooks. blk-rq-qos
> is a great design but right now, it is totally fixed and built-in and shut
> out peoples who want to use it with external module.
> 
> This patchset attempts to make blk-rq-qos framework pluggable and modular.
> Then we can update the blk-rq-qos policy module w/o stopping the IO workload.
> And it is more convenient to introduce new policy on old machines w/o udgrade
> kernel. And we can close all of the blk-rq-qos policy if we needn't any of
> them. At the moment, the request_queue.rqos list is empty, we needn't to
> waste cpu cyles on them.
> 
>

Please write tests in blktests [1] to cover the code that we are
changing in this commit.

-ck

[1] https://github.com/osandov/blktests
Wang Jianchao Feb. 16, 2022, 1:43 a.m. UTC | #2
On 2022/2/15 9:01 下午, Chaitanya Kulkarni wrote:
> Wang Jianchao (Kuaishou),
> 
> On 2/15/22 04:36, Wang Jianchao (Kuaishou) wrote:
>> Hi Jens
>>
>> blk-rq-qos is a standalone framework out of io-sched and can be used to
>> control or observe the IO progress in block-layer with hooks. blk-rq-qos
>> is a great design but right now, it is totally fixed and built-in and shut
>> out peoples who want to use it with external module.
>>
>> This patchset attempts to make blk-rq-qos framework pluggable and modular.
>> Then we can update the blk-rq-qos policy module w/o stopping the IO workload.
>> And it is more convenient to introduce new policy on old machines w/o udgrade
>> kernel. And we can close all of the blk-rq-qos policy if we needn't any of
>> them. At the moment, the request_queue.rqos list is empty, we needn't to
>> waste cpu cyles on them.
>>
>>
> 
> Please write tests in blktests [1] to cover the code that we are
> changing in this commit.
> 
> -ck
> 
> [1] https://github.com/osandov/blktests
> 

Yes, I will send out next

Thanks
Jianchao