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/
Home Products Support Community News


Re: [Xen-devel] what happens when a PoD page is touched?

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] what happens when a PoD page is touched?
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Mon, 16 May 2011 10:39:01 +0100
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 May 2011 02:39:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01D570E9@trantor>
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: <AEC6C66638C05B468B556EA548C1A77D01D57078@trantor> <20110516083905.GP24068@xxxxxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01D570E9@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
At 10:17 +0100 on 16 May (1305541030), James Harper wrote:
> > - alloc pages to be ballooned using an interface that doesn't scrub
> them;
> That exists under Windows 2003 and newer (MmAllocatePagesForMdlEx with
> the MM_DONT_ZERO_ALLOCATION flag), but not before that. But I thought
> the pages had to be zeroed by us anyway as part of the contract? I tried
> testing each page before freeing and the first 90% or so are already all
> zeroes but the last few % of pages aren't necessarily.

You're not _required_ to zero them, but Xen won't scrub them before
giving them to another VM so if you care about the contents you need to
scrub them yourself.

We could add a flag to decrease_reservation to ask Xen to scrub the
pages for you (on your time, obviously).  That way Xen would be able to
DTRT with PoD pages instead of populating them, zeroing them and
removing them again. 

> Is the delay only the first time a page is touched? If I allocate 1MB
> worth of pages (I'm ballooning up/down in 1MB increments) and Windows
> goes through and zero's the lot, will the sweep be invoked every time a
> new page is hit (potentially just reusing one of the previously zeroed
> pages)?

AIUI the sweep is invoked when you run out of PoD pages, so not every
time, but more frequently as you use up more of your memory.


Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

Xen-devel mailing list