qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 0/3] linux-aio: fix batch submission


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v7 0/3] linux-aio: fix batch submission
Date: Wed, 10 Dec 2014 14:11:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0


On 01/12/2014 10:04, Ming Lei wrote:
> The 1st patch fixes batch submission.
> 
> The 2nd one fixes -EAGAIN for non-batch case.
> 
> The 3rd one is a cleanup.
> 
> This patchset is splitted from previous patchset(dataplane: optimization
> and multi virtqueue support), as suggested by Stefan.

I think this series needs a rewrite.  Instead of removing 'node' from
'struct qemu_laiocb', each LaioQueue should actually have a list (or
SIMPLEQ) of pending 'struct qemu_laiocb'.

Every time you do an io_submit, you copy from the laiocb queue to the
iocbs array.  If it returns N, the first N elements are removed from the
list.  There is no need to do a memmove, the iocbs will be populated
again on the next io_submit.  If io_submit fails with anything but
EAGAIN, just abort().  It should never happen.

Every time you get a request, and the list was empty, you do an io_submit.

Every time you get a bdrv_unplug and the nesting level was 1, you do an
io_submit.

Every time you get a completion, if the pending queue is not empty, you
do an io_submit.

It should be _that_ simple.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]