Re: [PATCH v6 2/2] virtio-blk: support mq_ops->queue_rqs()

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

 



On 4/6/22 08:32, Suwan Kim wrote:
> This patch supports mq_ops->queue_rqs() hook. It has an advantage of
> batch submission to virtio-blk driver. It also helps polling I/O because
> polling uses batched completion of block layer. Batch submission in
> queue_rqs() can boost polling performance.
> 
> In queue_rqs(), it iterates plug->mq_list, collects requests that
> belong to same HW queue until it encounters a request from other
> HW queue or sees the end of the list.
> Then, virtio-blk adds requests into virtqueue and kicks virtqueue
> to submit requests.
> 
> If there is an error, it inserts error request to requeue_list and
> passes it to ordinary block layer path.
> 
> For verification, I did fio test.
> (io_uring, randread, direct=1, bs=4K, iodepth=64 numjobs=N)
> I set 4 vcpu and 2 virtio-blk queues for VM and run fio test 5 times.
> It shows about 2% improvement.
> 
>                                   |   numjobs=2   |   numjobs=4
>        -----------------------------------------------------------
>          fio without queue_rqs()  |   291K IOPS   |   238K IOPS
>        -----------------------------------------------------------
>          fio with queue_rqs()     |   295K IOPS   |   243K IOPS
> 
> For polling I/O performance, I also did fio test as below.
> (io_uring, hipri, randread, direct=1, bs=512, iodepth=64 numjobs=4)
> I set 4 vcpu and 2 poll queues for VM.
> It shows about 2% improvement in polling I/O.
> 
>                                        |   IOPS   |  avg latency
>        -----------------------------------------------------------
>          fio poll without queue_rqs()  |   424K   |   613.05 usec
>        -----------------------------------------------------------
>          fio poll with queue_rqs()     |   435K   |   601.01 usec
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Suwan Kim <suwan.kim027@xxxxxxxxx>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck






[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