On 6/9/21 1:07 AM, Bart Van Assche wrote: > While one or more requests with a certain I/O priority are pending, do not > dispatch lower priority requests. Dispatch lower priority requests anyway > after the "aging" time has expired. > > This patch has been tested as follows: > > modprobe scsi_debug ndelay=1000000 max_queue=16 && > sd='' && > while [ -z "$sd" ]; do > sd=/dev/$(basename /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/*) > done && > echo $((100*1000)) > /sys/block/$sd/queue/iosched/aging_expire && > cd /sys/fs/cgroup/blkio/ && > echo $$ >cgroup.procs && > echo 2 >blkio.prio.class && > mkdir -p hipri && > cd hipri && > echo 1 >blkio.prio.class && > { max-iops -a1 -d32 -j1 -e mq-deadline $sd >& ~/low-pri.txt & } && > echo $$ >cgroup.procs && > max-iops -a1 -d32 -j1 -e mq-deadline $sd >& ~/hi-pri.txt > > Result: > * 11000 IOPS for the high-priority job > * 400 IOPS for the low-priority job > > If the aging expiry time is changed from 100s into 0, the IOPS results change > into 6712 and 6796 IOPS. > > 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: Hannes Reinecke <hare@xxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Cc: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> > Cc: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > --- > block/mq-deadline-main.c | 42 +++++++++++++++++++++++++++++++++++----- > 1 file changed, 37 insertions(+), 5 deletions(-) > 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)