WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Tracking guest pages modified by qemu-dm / backend

To: AP <apxeng@xxxxxxxxx>
Subject: Re: [Xen-devel] Tracking guest pages modified by qemu-dm / backend
From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Date: Sat, 25 Jun 2011 13:30:31 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Delivery-date: Sat, 25 Jun 2011 10:32:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=senrfif6M5NaCtNS1xV0ULHqg/muUrEveFm5BLjN+ME=; b=N52sM2q9XPHgFLnP4PpWHwiRKtYxJWVoiTcvcFe/cnFiPoWYUvZtZMVp4+7JNHQpa8 SR9PrcGhq8NyMTi8zxES8BhxQrNPapT2BUVsg0F8qI+9V9Wg+1EKD+AQX6jr+CFDIdD5 ZyqC66Wa4oGpeUMsIgbTe2Frqkv7aK5B0Ffhc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=KCgfoDH0OAnYr7gF5WFjzPccwENSHQpptx1Y87IBLWkN0KKTJ6BEPtPr4rizBjP8L7 XKYzSZbXcMi7nHvPR6RdZOV8v9OE9hiXYS6pkE5QkjkWKY2bfkniNwBWmDwTA3jFBbnb T4aAtI2oXdqFwmEee2JY9xMMwr3eawzkyoG5k=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTingeuL+05d8jBv5V1dYHrcC69ZkSA@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BANLkTimiagS5cXj0nOPkCzxMzZMaZH724w@xxxxxxxxxxxxxx> <20110622084953.GR17634@xxxxxxxxxxxxxxxxxxxxxxx> <BANLkTi=xKF79x-5pg2us7cjZ9-K6kzKfgA@xxxxxxxxxxxxxx> <20110624084010.GW17634@xxxxxxxxxxxxxxxxxxxxxxx> <BANLkTingeuL+05d8jBv5V1dYHrcC69ZkSA@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, Jun 24, 2011 at 1:22 PM, AP <apxeng@xxxxxxxxx> wrote:
On Fri, Jun 24, 2011 at 1:40 AM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
> At 11:06 -0700 on 23 Jun (1308827188), AP wrote:
>> On Wed, Jun 22, 2011 at 1:49 AM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
>> > Hi,
>> >
>> > At 15:43 -0700 on 21 Jun (1308671006), AP wrote:
>> >> Consider an HVM domain with EPT. When qemu-dm, backend or any other
>> >> device model modifies DomU memory (like on a disk read or packet
>> >> received), how does Xen track the pages that have been modified? For
>> >> example, when an DomU is being migrated while IO is occurring.
>> >
>> > Backends use grant tables to map guest memory; the granted pages are
>> > marked dirty when the backend disconnects.  Qemu-dm uses the
>> > HVMOP_modified memory hypercall to tell Xen that it's written to
>> > the guest's memory.
>>
>> From what I see for EPT/HAP, log dirty is turned on only during domain
>> save.
>
> It's also used to track just the virtual framebuffer so qemu can avoid
> having to compute which parts of the screen to send over VNC.
>
> But for general memory it's only used during save, because there's no
> need for it otherwise.  If you're confused about that maybe you should
> read the original paper on Xen live migration:
> http://www.cl.cam.ac.uk/research/srg/netos/papers/2005-nsdi-migration.pdf

Sorry I think I did not phrase my question well. What I was not able
to understand was how / where the granted pages were being marked
dirty w.r.t EPT after the backend disconnects.

I am not sure what you mean by "backend disconnects", but each time a grant
is unmapped, log dirty bit for the page is set.
Check out the __gnttab_unmap_common function in xen/common/grant_table.c
it calls gnttab_mark_dirty(..) which is a macro for paging_mark_dirty.

Thanks,
AP

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel