From: Uri Lublin <uril@redhat.com>
To: qemu-devel@nongnu.org
Cc: Uri Lublin <uril@redhat.com>
Subject: [Qemu-devel] [DEBUGGING DO-NOT-COMMIT 2/2]: debugging migration busy-looping
Date: Tue, 3 Feb 2009 13:04:23 +0200 [thread overview]
Message-ID: <1233659063-11313-2-git-send-email-uril@redhat.com> (raw)
In-Reply-To: <1233659063-11313-1-git-send-email-uril@redhat.com>
Try it with/without fix for migration busy-loop, and migrate
a VM. (without the fix, patch fails just manually fix it).
To see the problem clearly try to suspend the destination while a migration
process is active (e.g. with CTRL-z and fg).
Signed-off-by: Uri Lublin <uril@redhat.com>
---
migration.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/migration.c b/migration.c
index e8bafa6..5db9c47 100644
--- a/migration.c
+++ b/migration.c
@@ -165,11 +165,14 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
{
FdMigrationState *s = opaque;
ssize_t ret;
+ int n = 0;
do {
ret = s->write(s, data, size);
+ if (++n % 1000 == 0) printf("LOOP size=%lu n=%d\n", size, n);
} while (ret == -1 && s->get_error(s) == EINTR);
+ if (n > 4) printf("OUT size=%lu n=%d\n", size, n);
if (ret == -1)
ret = -(s->get_error(s));
--
1.6.0.6
prev parent reply other threads:[~2009-02-03 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 11:04 [Qemu-devel] [PATCH 1/2] migrate.c: migrate_fd_put_buffer(): Do not busyloop: stop writing if EWOULDBLOCK Uri Lublin
2009-02-03 11:04 ` Uri Lublin [this message]
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=1233659063-11313-2-git-send-email-uril@redhat.com \
--to=uril@redhat.com \
--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 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).