From: Anthony Liguori <aliguori@us.ibm.com>
To: dlaor@redhat.com
Cc: Uri Lublin <uril@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCK
Date: Fri, 22 May 2009 08:20:22 -0500 [thread overview]
Message-ID: <4A16A696.8070902@us.ibm.com> (raw)
In-Reply-To: <4A151F9F.7050208@redhat.com>
Dor Laor wrote:
> Uri Lublin wrote:
>> The migration code is non-blocking, designed for live migration.
>>
>> Practically migrate_fd_put_buffer busy-loops trying to write, as
>> on many machines EWOULDBLOCK==EAGAIN (look in
>> include/asm-generic/errno.h).
>>
>> Signed-off-by: Uri Lublin <uril@redhat.com>
>> ---
>> migration.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/migration.c b/migration.c
>> index 859d945..ca397fa 100644
>> --- a/migration.c
>> +++ b/migration.c
>> @@ -176,7 +176,7 @@ ssize_t migrate_fd_put_buffer(void *opaque, const
>> void *data, size_t size)
>>
>> do {
>> ret = s->write(s, data, size);
>> - } while (ret == -1 && ((s->get_error(s)) == EINTR ||
>> (s->get_error(s)) == EWOULDBLOCK));
>> + } while (ret == -1 && ((s->get_error(s)) == EINTR));
>>
>> if (ret == -1)
>> ret = -(s->get_error(s));
>>
> There is additional stuff that needs to test EWOULDBLOCK in further
> locations in the code.
> Otherwise migration will fail.
>
> commit 2d875410cb168fa728dcde96885a3e4ddfd0bb58
> Author: Dor Laor <dor@redhat.com>
> Date: Thu May 21 12:29:39 2009 +0300
>
> The migration code is non-blocking, designed for live migration.
> Practically migrate_fd_put_buffer busy-loops trying to write, as
> on many machines EWOULDBLOCK==EAGAIN (look in
> include/asm-generic/errno.h).
> Based on Uri Lublin's patch.
> Signed-off-by: Dor Laor <dor@redhat.com>
This is whitespace damaged, presumably from copy/paste, can you resend?
--
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-05-22 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 11:08 [Qemu-devel] [PATCH] migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCK Uri Lublin
2009-05-21 9:32 ` Dor Laor
2009-05-22 13:20 ` Anthony Liguori [this message]
2009-05-23 15:55 ` Dor Laor
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=4A16A696.8070902@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=dlaor@redhat.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).