qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: Yaniv Kamay <ykamay@redhat.com>,
	aliguori@us.ibm.com, Dor Laor <dlaor@redhat.com>,
	avi@redhat.com
Subject: [Qemu-devel] [PATCH 1/3] stop dirty tracking just at the end of migration
Date: Tue, 31 Mar 2009 12:51:13 -0400	[thread overview]
Message-ID: <1238518275-2980-2-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1238518275-2980-1-git-send-email-glommer@redhat.com>

If there is still work to do, it is not safe to assume we
can end the dirty tracking. Specifically, kvm can update the dirty
tracking log inside ram_save_block(), leaving pages still out of sync
if we go with the current code.

Based on a patch by Yaniv Kamay

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Yaniv Kamay <ykamay@redhat.com>
CC: Dor Laor <dlaor@redhat.com>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index 5e6c621..1626f8a 100644
--- a/vl.c
+++ b/vl.c
@@ -3249,10 +3249,10 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)
     /* try transferring iterative blocks of memory */
 
     if (stage == 3) {
-        cpu_physical_memory_set_dirty_tracking(0);
 
         /* flush all remaining blocks regardless of rate limiting */
         while (ram_save_block(f) != 0);
+        cpu_physical_memory_set_dirty_tracking(0);
     }
 
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
-- 
1.5.6.6

  reply	other threads:[~2009-03-31 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 16:51 [Qemu-devel] [PATCH 0/3] Migration Fixes Glauber Costa
2009-03-31 16:51 ` Glauber Costa [this message]
2009-03-31 16:51   ` [Qemu-devel] [PATCH 2/3] create qemu_file_set_error Glauber Costa
2009-03-31 16:51     ` [Qemu-devel] [PATCH 3/3] propagate error on failed completion Glauber Costa
2009-03-31 17:05       ` Edgar E. Iglesias
2009-03-31 17:06       ` Blue Swirl
2009-03-31 17:15         ` Glauber Costa
2009-03-31 19:04   ` [Qemu-devel] Re: [PATCH 1/3] stop dirty tracking just at the end of migration Yaniv Kamay
2009-03-31 19:45     ` Glauber Costa
2009-03-31 19:55       ` Yaniv Kamay

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=1238518275-2980-2-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ykamay@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).