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<<MAX_ORDER naturally aligned physical address (any ram
before the alignment was wasted). In any case all 'struct page' where
pfn_valid would return true, should start with PG_reserved set, if
it's not the case it should be fixed I guess.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to