From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch] Fix block I/O hang.
Date: Tue, 11 Nov 2008 11:55:42 -0600 [thread overview]
Message-ID: <4919C71E.2030509@codemonkey.ws> (raw)
In-Reply-To: <4919C550.5020609@redhat.com>
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
>
>
>
next prev parent reply other threads:[~2008-11-11 17:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 16:35 [Qemu-devel] [patch] Fix block I/O hang Gerd Hoffmann
2008-11-11 16:49 ` Anthony Liguori
2008-11-11 17:48 ` Gerd Hoffmann
2008-11-11 17:55 ` Anthony Liguori [this message]
2008-11-11 20:51 ` Gerd Hoffmann
2008-11-11 21:07 ` Anthony Liguori
2008-11-11 21:34 ` Gerd Hoffmann
2008-11-12 13:49 ` Johannes Stezenbach
2008-11-12 14:58 ` Anthony Liguori
2008-11-12 15:01 ` Gerd Hoffmann
2008-11-12 13:03 ` Gerd Hoffmann
2008-11-12 14:57 ` Anthony Liguori
2008-11-13 9:14 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4919C71E.2030509@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.