From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH] Handle vma regions with no backing page Date: Wed, 4 Jun 2008 21:51:35 +0200 Message-ID: <20080604195135.GP21613@duo.random> References: <20080603113937.GE8158@duo.random> <1212592164.26322.10.camel@lnx-benami> <20080604161755.GC7089@il.ibm.com> <20080604193402.GO21613@duo.random> <4846EFE0.5090304@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Muli Ben-Yehuda , Ben-Ami Yassour1 , Han Weidong , "Kay, Allen M" , Amit Shah , kvm@vger.kernel.org, avi@qumranet.com, Dave Hansen To: Anthony Liguori Return-path: Received: from host36-195-149-62.serverdedicati.aruba.it ([62.149.195.36]:59363 "EHLO mx.cpushare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbYFDTvh (ORCPT ); Wed, 4 Jun 2008 15:51:37 -0400 Content-Disposition: inline In-Reply-To: <4846EFE0.5090304@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jun 04, 2008 at 02:41:20PM -0500, Anthony Liguori wrote: > The pfn does have a backing page. When using CONFIG_FLATMEM, pfn_valid() > is simply: > > #ifdef CONFIG_FLATMEM > #define pfn_valid(pfn) ((pfn) < end_pfn) > #endif > > And this is true, pfn_valid() just indicates whether there is a space in > mem_map[], and there certainly is. Note this only happens when there is a > valid PFN that's greater than the PCI memory (using 4GB+ of memory). So everything is fine with pfn_valid. The check against end_pfn with flatmem is what I also the one I've looked while doing the reserved-ram patch. pfn_valid must only signal if pfn_to_page(pfn) returns garbage or a struct page (you can't call pfn_to_page if pfn_valid is 0). That's all. > Dave mentioned that SetPageReserved() doesn't necessarily get called for > zones with bad alignment. What does 'bad alignment' mean? Buddy was used to require each zone to start at 1<