• Anton Blanchard's avatar
    [PATCH] ppc64: allocate NUMA node data node locally · d19b41b9
    Anton Blanchard authored
    Instead of statically allocating the NUMA node structures, do it at runtime
    with node local memory where possible.  With NR_CPUS=128 we had over 800kB
    of memory allocated before this patch, now we allocate only as many nodes
    as the machine requires.
    
    We have to do some fancy footwork in do_init_bootmem since we use both the
    LMB allocator and the bootmem allocator at the same time.  The problem has
    always been there although I only recently found a test case that hit it.
    Wrap that logic in careful_allocation which uses the LMB allocator then
    falls back to the bootmem allocator if required.
    
    Now alloc_bootmem on a node with no memory doesnt panic, we dont need the
    hack in paging_init so remove it.
    Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    d19b41b9
init.c 21.4 KB