On Fri, 18 Aug 2006 09:58:13 -0700 (PDT)
Christoph Lameter <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]