lkml.org 
[lkml]   [2006]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [MODSLAB 3/7] A Kmalloc subsystem
On Fri, 18 Aug 2006 09:58:13 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> On Fri, 18 Aug 2006, KAMEZAWA Hiroyuki wrote:
>
> > Just a note: with SPARSEMEM, we need more calculation and access to
> > mem_section[] table and page structs(mem_map).
>
> Uhh, a regression against DISCONTIG. Could you address that issue?
>
At first, ia64's DISCONTIG is special because of VIRTUAL_MEMMAP.
and ia64's SPARSEMEM is special,too. it's SPARSEMEM_EXTREME.


Considering generic arch, see include/asm-generic/memory_model.h,
which doesn't use virtual mem_map.

with FLATMEM, pfn_to_page() is pfn + mem_map. just an address calclation.

with *usual* DISCONTIG
--
pgdat = NODE_DATA(pfn_to_nid(pfn));
page = pgdat->node_mem_map + pfn - pgdat->node_start_pfn
--
if accessing to pgdat is fast, cost will not be big problem.
pfn_to_nid() is usually implemeted by calclation or table look up.

and usual SPARSEMEM, (not EXTREME)
--
page = mem_section[(pfn >> SECTION_SHIFT)].mem_map + pfn
--
need one table look up. maybe not very big.

with SPARSEMEM_EXTREME
--
page = mem_section[(pfn >> SECTION_SHIFT)][(pfn & MASK)].mem_map + pfn
--
need one (big)table look up.


-Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-18 20:23    [W:0.073 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site