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] GPLPV memory ballooning and x32

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Aravindh Puthiyaparambil <aravindh@xxxxxxxxxx>, Pasi Kärkkäinen <pasik@xxxxxx>
Subject: RE: [Xen-devel] GPLPV memory ballooning and x32
From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
Date: Tue, 25 May 2010 10:25:03 +0100
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 May 2010 02:26:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01996B09@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: <D83C13F0C853364EB226DBEE584BBE614DAB25F830@xxxxxxxxxxxxxxxxxxxxxxxxxx> <C8213256.150CE%keir.fraser@xxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01996B09@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acr7Eln9C5XzuBeXS+KSV/Yrq0icfAAdxdPgABNdRaMAAE4W8AAEoe8g
Thread-topic: [Xen-devel] GPLPV memory ballooning and x32
> -----Original Message-----
> 
> For that to work, I would need to be able to do the following:
> . detect the unpopulated PoD pages via some hypercall(s)
> . allocate specific pages in Windows (MmAllocatePagesForMdl has Low
> and High address parameters which suggest this sort of ability...)
> . make sure Windows doesn't touch those pages when I allocate them
> (I guess it doesn't anyway but I can't look at the source to
> check...)
> . change the pages from PoD to 'empty' via some hypercall(s) - or
> maybe this isn't necessary... I can just allocate them to balloon
> down, and then 'touch' each page (to make xen populate it) then free
> them, as long as I remember which pages are PoD and which are
> 'empty'
> 

The position of invalid entries in the P2M are not important. IIRC all entries 
start PoD. If Windows can allocate without zeroing the memory (for which you'll 
need MmAllocatePagesForMdlEx, so 2k3 SP1+) then the entry will remain PoD until 
the decrease reservation makes it invalid. Otherwise, there will be a populate 
followed by an immediate invalidation, which will clearly slow things down a 
little but is not disastrous. Providing the total number of populated pages 
does not reach the dynamic-max threshold, everything is fine. The only caveat 
with Windows is that it is good to balloon early because allocating enough 
guest pages to fulfill a balloon-down gets harder as the myriad of Windows 
kernel modules can quite aggressively land-grab in my experience.

  Paul

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