From: Blue Swirl <blauwirbel@gmail.com>
To: Uri Lublin <uril@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] exec-migration: handle EINTR in popen_get_buffer()
Date: Tue, 9 Jun 2009 17:51:02 +0300 [thread overview]
Message-ID: <f43fc5580906090751s3fac2e20s5fa91ec82409f63@mail.gmail.com> (raw)
In-Reply-To: <4A2E3E2D.1030401@redhat.com>
On 6/9/09, Uri Lublin <uril@redhat.com> wrote:
> On 06/08/2009 07:55 PM, Blue Swirl wrote:
>
> > On 6/8/09, Uri Lublin<uril@redhat.com> wrote:
> >
> > > Sometimes, upon interrupt, fread returns with no data, and
> > > the (incoming exec) migration fails.
> > >
> > > Fix by retrying on such a case.
> > >
> >
> > Maybe a better solution would be to introduce qemu_{f,}{read,write},
> > which handle EINTR and partial reads/writes.
> >
> >
> >
>
> The migration code does not care about partial reads/writes (at this
> level). Data is read /written to/from a buffer. When needed/available we
> retry.
>
> I can introduce qemu_{f,}{read,write} which only takes care of EINTR (by
> retrying) but the caller would have to handle partial reads/writes (and
> EAGAIN). Would that be helpful ?
Would we really need two functions, one with partial read/write and
EAGAIN handling and one with only EINTR? There's fread_targphys which
handles partial reads/writes, but not EINTR/EAGAIN, otherwise in many
{f]{read,write} use cases there is no handling for any of these.
next prev parent reply other threads:[~2009-06-09 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 16:27 [Qemu-devel] [PATCH] exec-migration: handle EINTR in popen_get_buffer() Uri Lublin
2009-06-08 16:55 ` Blue Swirl
2009-06-09 10:49 ` Uri Lublin
2009-06-09 14:51 ` Blue Swirl [this message]
2009-06-08 17:54 ` Michael S. Tsirkin
2009-06-09 12:20 ` Michael S. Tsirkin
2009-06-09 12:32 ` Uri Lublin
-- strict thread matches above, loose matches on Subject: below --
2009-06-02 16:49 Uri Lublin
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=f43fc5580906090751s3fac2e20s5fa91ec82409f63@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=uril@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).