[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-devel] what happens when a PoD page is touched?
> > 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); Doing that pretty successfully. The only slowdown is when I balloon down and have to zero the pages first (see below) > - 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. > - 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? > 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)? Thanks James _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |