From: Keir Fraser Subject: Re: [PATCH] Fix balloon handling of highmem pages Date: Sun, 01 Jul 2007 22:06:35 +0100 Message-ID: References: <200706291653.14578.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200706291653.14578.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson , Keir Fraser Cc: xen-devel@lists.xensource.com, anthony@communitymesh.com List-Id: xen-devel@lists.xenproject.org Applied, but have you tested with 'mem=' on the domain cmdline to give it a memmap bigger than its original allocation of memory? In this case it looks like the code in mm/init-xen.c does the right thing in tandem with this patch (i.e., it increments totalhigh_pages for each not-currently-present page, and you then decrement again when the not-present pages get added to the balloon). But I'm not 100% certain and it could do with being tested. Thanks, Keir On 29/6/07 16:53, "Mark Williamson" wrote: > I knocked up a quick patch to fix the balloon driver's handling of highmem > pages. Should apply cleanly to the Linux dev tree. I can also submit it for > 3.1 if wanted. > > Without this, LowTotal can go negative (given it's an unsigned integer) and > then appears as ~4Gig, which is a bit silly. > > I beliee this fixes Anthony Wright's bug #733 in Bugzilla > (http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=733). Credit to > Anthony for noticing the problem, and figuring out that he was actually > seeing an unsigned int going "negative". > > Cheers, > Mark