qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCK
@ 2009-05-19 11:08 Uri Lublin
  2009-05-21  9:32 ` Dor Laor
  0 siblings, 1 reply; 4+ messages in thread
From: Uri Lublin @ 2009-05-19 11:08 UTC (permalink / raw)
  To: qemu-devel

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));
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-23 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-05-23 15:55     ` Dor Laor

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).