Subject: Re: Non-contiguous physical memory on 8572

From: Scott Wood <[email-masked]>
Date: Thu, 02 Jul 2009 16:14:26 -0500

Aaron Pace wrote:
> In MMU_init of arch/powerpc/mm/init_32.c, where the current code sets
> lmb.memory.cnt to zero, I instead walk through the memory regions and
> call lmb_reserve for each chunk of memory that lies in a 'hole'.
> There are then some minor fixups to make sure that total_memory and
> total_highmem get the right numbers.  This small change allows all
> four gigabytes of memory to be accessed and used in my tests.
> 
> Am I missing something obvious?

The main downsides that I see are wasted memory for bookkeeping of the 
hole (how acceptable this is depends on how large the hole is relative 
to the size of RAM -- it's a tradeoff against speed of looking up page 
structs), and that the reserved area may still be mapped in the TLB 
without the guarded bit set.

-Scott