[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mm
Subject:    Re: [RFC] virtual memmap for sparsemem [1/2] arch independent part
From:       "Luck, Tony" <tony.luck () intel ! com>
Date:       2006-10-20 16:20:12
Message-ID: 20061020162012.GA24338 () intel ! com
[Download RAW message or body]

On Thu, Oct 19, 2006 at 07:26:33PM -0700, Christoph Lameter wrote:
> On Fri, 20 Oct 2006, KAMEZAWA Hiroyuki wrote:
> 
> > By the way, we have to make sizeof(struct page) as (1 << x) aligned size to use
> > large-sized page. (IIRC, my gcc-3.4.3 says it is 56bytes....)
> 
> Having it 1 << x would be useful to simplify the pfn_valid check but 
> you can also check the start and the end of the page struct to allow the 
> page struct cross a page boundary. See the ia64 virtual memmap 
> implementation of pfn_valid.

Rounding up sizeof(struct page) to a power of two would have to provide
a huge benefit somewhere to outweigh the cost of doing so.  With a 16K
page size there are 64K pages/gigabyte ... so adding an 8 byte pad now would
waste an extra 0.5M per gigabyte of memory (which adds up to 2G on SGI's
monster 4TB machines).  That's pretty bad ... but if we ever added anything
new to struct page and pushed it just over 64bytes, it would be a complete
disaster to round up to 128!!!

Listen to Christoph.  Check the start and end address of the page struct in
pfn_valid.

-Tony

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic