qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [patch] Fix block I/O hang.


From: Anthony Liguori
Subject: Re: [Qemu-devel] [patch] Fix block I/O hang.
Date: Tue, 11 Nov 2008 11:55:42 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Gerd Hoffmann wrote:
Anthony Liguori wrote:
Gerd Hoffmann wrote:
  Hi,

$subject says all.

please apply,
  Gerd
Under what circumstances?  posix_aio_read() is only invoked from a
select callback.  This means there should be data available to be read.

Hmm, looked at the loop again a bit closer.

First, the check for errno == EAGAIN is superfluous when the filehandle
isn't in non-blocking mode.  It will not happen.

Second, the check for errno == EINTR is superfluous too because the loop
will retry the read() syscall anyway for *any* error.

Yes, this all is. I think the intention was to make it non-blocking so that the full queue could be drained to avoid superfluous calls to posix_aio_read() since it handles all outstanding ops at once. However,

Third, when called from a select callback it shouldn't block indeed.  It
does though for me now and then when booting xen guests (with a big
stack of xenner patches).  Doesn't reproduce reliable though.  Sprinkled
in a printk (with rfd being non-blocking) and got a EAGAIN once, so it
got called with rfd not having data.

I think it would be good to root cause this.  AFAICT, it shouldn't block.

Regards,

Anthony Liguori


cheers,
  Gerd







reply via email to

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