About SECTION_SIZE_BITS for Sparsemem

Mel Gorman mel at csn.ul.ie
Tue Jul 13 05:28:52 EDT 2010


On Tue, Jul 13, 2010 at 12:03:15PM +0900, KAMEZAWA Hiroyuki wrote:
> On Tue, 13 Jul 2010 11:05:26 +0900
> Minchan Kim <minchan.kim at gmail.com> wrote:
> 
> > On Tue, Jul 13, 2010 at 9:25 AM, KAMEZAWA Hiroyuki
> > <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> 
> > > For example, prepare a page filled with (1 << PG_reserved).
> > > and replace it with unnecessary memmap rather than freeing a page for memmap.
> > 
> > Hmm. I don't got your point.
> > The problem is that we access struct page by pfn number not address.
> > 
> > You mean let's remain memmap on hole with changing PageReseved instead of free?
> > 
> Like a ZERO_PAGE, preparing RESERVED_PAGE, 
> which is filled with (1 << PG_reserved) as
> 
>   0x00000400,0x00000400,0x00000400,0x00000400
>   .....
> 
> And map this pages to every hole. Then, you only waste a page to fill all holes
> because "struct page" is aligned to 4bytes.
> 

I like this idea. It would allow memmap_valid_within to be thrown away
altogether and it maintains the assumptions of the memory model and
sounds "cheap".

> 
> > I think it's not a good idea to add new flag. If
> > Kame. Could you review my RFC patch which makes pfn_valid check more
> > tightly on sparsemem?
> Sure.
> 
> Thanks,
> -Kame
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab



More information about the linux-arm-kernel mailing list