[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.