From: "Charles Coffing" Subject: balloon.py unaware of pages on page_scrub_list Date: Mon, 19 Jun 2006 18:15:13 -0400 Message-ID: <4496CE81.D169.003C.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Suppose I create a domain with a "large" amount of memory (for some value = of "large") and I set "on_crash" to be "reboot". Then I crash the domain. = All the domain's memory gets put on the page_scrub_list. Then xend = attempts to restart the domain. The balloon code in xend sees that very = little memory is free, so it attempts to balloon dom0 down even more. At = this point, the balloon code and the page scrubber are racing. The domain = may fail to restart, or domain 0 may be squeezed down farther than = necessary. If dom0-min-mem is not tuned for the machine, this can get = ugly. I think this applies to rebooting too, not just crashing. Would it make sense to give this information to balloon.py, and apply some = heuristics? Perhaps xend should wait for the scrub list to go to zero = before trying to balloon. Or maybe it should consider that memory as = free, and only try to balloon (needed - to_scrub). The most obvious way (to me) to get that information to xend is via = DOM0_PHYSINFO. That way, the number of free pages and the number of pages = to scrub can be gotten atomically. Thoughts? I volunteer to code and test this if there's some agreement on how it = should be done. Thanks, Chuck