Re: [PATCH 9/9] block/mq-deadline: Add cgroup support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/27/21 3:01 AM, Bart Van Assche wrote:
> Add support for configuring I/O priority per block cgroup. Assign the lowest
> of the following two priorities to a request: rq->ioprio and blkcg->ioprio.
> Maintain statistics per cgroup and make these available in sysfs.
> 
> This patch has been tested as follows:
> 
> SHELL 1
> 
> modprobe scsi_debug ndelay=1000000 max_queue=16 &&
> while [ -z "$sd" ]; do sd=/dev/$(basename /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/*); done &&
> cd /sys/fs/cgroup/blkio/ &&
> echo 2 >blkio.dd.prio &&
> mkdir -p hipri &&
> cd hipri &&
> echo 1 >blkio.dd.prio &&
> echo $$ >cgroup.procs &&
> max-iops -a1 -d32 -j1 -e mq-deadline $sd
> 
> SHELL 2
> 
> sd=/dev/$(basename /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/*) &&
> max-iops -a1 -d32 -j1 -e mq-deadline $sd
> 
> Result:
> * 12000 IOPS in shell 1
> *  2000 IOPS in shell 2
> 
> The max-iops script is a script that runs fio with the following arguments:
> --bs=4K --gtod_reduce=1 --ioengine=libaio --ioscheduler=${arg_e} --runtime=60
> --norandommap --rw=read --thread --buffered=0 --numjobs=${arg_j}
> --iodepth=${arg_d}
> --iodepth_batch_submit=${arg_a} --iodepth_batch_complete=$((arg_d / 2))
> --name=${positional_argument_1} --filename=${positional_argument_1}
> 
> Cc: Damien Le Moal <damien.lemoal@xxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Ming Lei <ming.lei@xxxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  block/Kconfig.iosched      |   6 ++
>  block/Makefile             |   1 +
>  block/mq-deadline-cgroup.c | 206 +++++++++++++++++++++++++++++++++++++
>  block/mq-deadline-cgroup.h |  73 +++++++++++++
>  block/mq-deadline.c        |  96 ++++++++++++++---
>  5 files changed, 370 insertions(+), 12 deletions(-)
>  create mode 100644 block/mq-deadline-cgroup.c
>  create mode 100644 block/mq-deadline-cgroup.h
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@xxxxxxx			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux