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 09:39:05 +0100
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 May 2011 01:39:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01D57078@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
At 11:16 +0100 on 15 May (1305458171), James Harper wrote:
> I'm finding that the time of boot and hibernation of Windows under
> xen-4.0.2-rc3 when maxmem is set is a big problem - 40 seconds to
> balloon down 512MB on my system. Hibernation is even worse with delays
> of minutes or hours.
> What happens when such a PoD page is touched? Does Xen or qemu handle
> this?

Xen handles it.  When you touch a PoD page the frame is backed with a
fresh, zeroed page from the pool of PoD pages.  The slowdown comes when
the PoD pages run low; then Xen has to scan guest memory looking for 
pages that are all zeroes and reclaim them into the PoD pool.

This is all pretty unpleasant, as you can imagine.  The practical 
advice is:

- get your balloon driver loaded as soon as you possibly can, 
  so you can balloon down before the Windows page scrubber pointlessly 
  touches all of RAM (AIUI on SMP systems this is pretty hard; it may be
  that once we get UEFI firmware it will be eaiser);
- alloc pages to be ballooned using an interface that doesn't scrub them;
- don't be too aggressive about how much you overcommit. 

Ideally, once Hyper-V brings in an interface for dynamic memory
ballooning in guests, we can use that and avoid this whole rigmarole for
new windows version. 

CC'ing George, who knows this code best.  IIRC there were some tweaks to
this code for XenServer, which I hope are all now upstream.  Do you know
whether 4.1-testing has the full set or are they only in -unstable?



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

Xen-devel mailing list