• Paul Mundt's avatar
    numa: mempolicy: dynamic interleave map for system init · b71636e2
    Paul Mundt authored
    This converts the default system init memory policy to use a dynamically
    created node map instead of defaulting to all online nodes.  Nodes of a
    certain size (>= 16MB) are judged to be suitable for interleave, and are added
    to the map.  If all nodes are smaller in size, the largest one is
    automatically selected.
    
    Without this, tiny nodes find themselves out of memory before we even make it
    to userspace.  Systems with large nodes will notice no change.
    
    Only the system init policy is effected by this change, the regular
    MPOL_DEFAULT policy is still switched to later on in the boot process as
    normal.
    Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Christoph Lameter <clameter@sgi.com>
    Cc: Hugh Dickins <hugh@veritas.com>
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b71636e2
mempolicy.c 47.7 KB