From: Keir Fraser Subject: Re: balloon question Date: Fri, 9 Jun 2006 08:05:50 +0100 Message-ID: <88c8090558680a08b523cf86cfb0c497@cl.cam.ac.uk> References: <4488479F.76E4.0078.0@novell.com> <15e85c6aa3f95ddc8a8d4d121ca056cc@cl.cam.ac.uk> <448938BA.76E4.0078.0@novell.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <448938BA.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 9 Jun 2006, at 08:00, Jan Beulich wrote: >> i386 deliberately marks pages beyond start_info->nr_pages as not >> Reserved so they get picked up by the balloon driver. Either x86/64 >> needs to do the same, or we stop doing that in i386. But then there >> will be pages that are legitimately Reserved that the balloon driver > > Where would, under Xen, such pages originate from? Namely beyond > start_info->nr_pages? > >> will erroneously pick up. Or we could make the balloon driver >> explicitly pick up all pages from start_info->nr_pages. Or have an > > It is already starting its scan at start_info->nr_pages. I don't think there will currently be anything beyond ->nr_pages. So we could just get rid of the PageReserved test altogether. But I think it's prefereable to take the following loop from i386/mm/init-xen.c and put it in x86/64's mem_init() somewhere: for (i = ...->nr_pages; i < max_pfn; i++) { ClearPageReserved(...); set_page_count(..., 1); } That'll allow any architecture to reserve stuff beyond ->nr_pages without breaking the balloon driver. Could you try adding the above code and see how it works out? -- Keir