Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lok41-0005Nf-Kt for qemu-devel@nongnu.org; Tue, 31 Mar 2009 15:56:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lok3y-0005Hx-0I for qemu-devel@nongnu.org; Tue, 31 Mar 2009 15:56:01 -0400 Received: from [199.232.76.173] (port=36076 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lok3x-0005HT-HL for qemu-devel@nongnu.org; Tue, 31 Mar 2009 15:55:57 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43146) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lok3x-0005Ls-0r for qemu-devel@nongnu.org; Tue, 31 Mar 2009 15:55:57 -0400 Message-ID: <49D27549.5080108@redhat.com> Date: Tue, 31 Mar 2009 22:55:53 +0300 From: Yaniv Kamay MIME-Version: 1.0 References: <1238518275-2980-1-git-send-email-glommer@redhat.com> <1238518275-2980-2-git-send-email-glommer@redhat.com> <49D26954.2030801@redhat.com> <20090331194542.GD20773@poweredge.glommer> In-Reply-To: <20090331194542.GD20773@poweredge.glommer> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/3] stop dirty tracking just at the end of migration Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, Dor Laor , qemu-devel@nongnu.org, avi@redhat.com Glauber Costa wrote: > On Tue, Mar 31, 2009 at 10:04:52PM +0300, Yaniv Kamay wrote: > >> We need to update dirty map before ram_save_block() loop. >> > From what I understand, this is needed in kvm only. > This patch applies to qemu. > OK, my mistake. sorry. > >> Glauber Costa wrote: >> >>> 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 >>> CC: Yaniv Kamay >>> CC: Dor Laor >>> --- >>> 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); >>> >>>