|
From: | Anthony Liguori |
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 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Dor Laor wrote:
Uri Lublin wrote:There is additional stuff that needs to test EWOULDBLOCK in further locations in the code.The migration code is non-blocking, designed for live migration. Practically migrate_fd_put_buffer busy-loops trying to write, ason many machines EWOULDBLOCK==EAGAIN (look in include/asm-generic/errno.h).Signed-off-by: Uri Lublin <address@hidden> --- 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));Otherwise migration will fail. commit 2d875410cb168fa728dcde96885a3e4ddfd0bb58 Author: Dor Laor <address@hidden> 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, ason many machines EWOULDBLOCK==EAGAIN (look in include/asm-generic/errno.h).Based on Uri Lublin's patch. Signed-off-by: Dor Laor <address@hidden>
This is whitespace damaged, presumably from copy/paste, can you resend? -- Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |