• Andrew Morton's avatar
    [PATCH] node-local mem_map for ia32 discontigmem · 76a0722f
    Andrew Morton authored
    From Martin Bligh.
    
    This patch remaps the lmem_map (struct page) arrays for each node onto
    their own nodes.  This is non-trivial, since all of ZONE_NORMAL, and
    hence permanently mapped KVA resides on node 0.
    
    Very early in the boot sequence, it calculates the size of the lmem_map
    arrays (rounding up to the nearest large page size), and reserves a
    suitable amount of permanent KVA by shifting down max_low_pfn to create
    a gap between max_low_pfn and highstart_pfn (both of which are normally
    about 896Mb).
    
    It then uses the new set_pmd_pfn function to set up the pmds correctly
    so that the large pages point at the physical addresses reserved from
    the remote nodes.
    
    Tested on NUMA-Q and some ratty old i386 PC kicking around under my
    desk (on 2.5.36-mm1).  Was good for a 20% improvement in system time on
    kernel compile when I initially benchmarked it against 2.5.32 or
    something - due to a reduction in inter-node traffic, better
    interconnect cache usage and locality.  Should have no effect on any
    system other than i386 NUMA systems.
    76a0722f
discontig.c 10.1 KB