From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUJ4w-0004kr-9S for qemu-devel@nongnu.org; Tue, 03 Feb 2009 06:04:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUJ4v-0004kZ-AC for qemu-devel@nongnu.org; Tue, 03 Feb 2009 06:04:29 -0500 Received: from [199.232.76.173] (port=40220 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUJ4v-0004kP-2Y for qemu-devel@nongnu.org; Tue, 03 Feb 2009 06:04:29 -0500 Received: from mx2.redhat.com ([66.187.237.31]:53279) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUJ4u-0000Ai-8F for qemu-devel@nongnu.org; Tue, 03 Feb 2009 06:04:28 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n13B4Q1k007495 for ; Tue, 3 Feb 2009 06:04:26 -0500 From: Uri Lublin Date: Tue, 3 Feb 2009 13:04:23 +0200 Message-Id: <1233659063-11313-2-git-send-email-uril@redhat.com> In-Reply-To: <1233659063-11313-1-git-send-email-uril@redhat.com> References: <1233659063-11313-1-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [DEBUGGING DO-NOT-COMMIT 2/2]: debugging migration busy-looping Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin 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 --- 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