[Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-06 Thread Ming Lei
Previously -EAGAIN is simply ignored for !s->io_q.plugged case, and sometimes it is easy to cause -EIO to VM, such as NVME device. This patch handles -EAGAIN by io queue for !s->io_q.plugged case, and it will be retried in following aio completion cb. Suggested-by: Paolo Bonzini Signed-off-by: M

Re: [Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-22 Thread Ming Lei
On Tue, Nov 18, 2014 at 10:06 PM, Paolo Bonzini wrote: > > > On 06/11/2014 16:10, Ming Lei wrote: >> +/* don't submit until next completion for -EAGAIN of non plug case */ >> +if (unlikely(!s->io_q.plugged)) { >> +return 0; >> +} >> + > > Is this an optimization or a fix for so

Re: [Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-24 Thread Paolo Bonzini
On 18/11/2014 15:06, Paolo Bonzini wrote: >> > +/* don't submit until next completion for -EAGAIN of non plug case */ >> > +if (unlikely(!s->io_q.plugged)) { >> > +return 0; >> > +} >> > + > Is this an optimization or a fix for something? Ah, if !io_q.plugged we must be in th

Re: [Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 5:52 PM, Paolo Bonzini wrote: > > > On 18/11/2014 15:06, Paolo Bonzini wrote: >>> > +/* don't submit until next completion for -EAGAIN of non plug case */ >>> > +if (unlikely(!s->io_q.plugged)) { >>> > +return 0; >>> > +} >>> > + >> Is this an optimizati

Re: [Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 11:11, Ming Lei wrote: > Yes, the above change need the corresponding comment, but this > patch needn't since the 1st case won't reach here, :-) I'm not sure I follow, but you can send v4 with a clearer comment I guess. :) Paolo

Re: [Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-18 Thread Paolo Bonzini
On 06/11/2014 16:10, Ming Lei wrote: > +/* don't submit until next completion for -EAGAIN of non plug case */ > +if (unlikely(!s->io_q.plugged)) { > +return 0; > +} > + Is this an optimization or a fix for something? > +/* > + * Switch to queue mode until -EA