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

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

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



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