• Andi Kleen's avatar
    [PATCH] x86_64: Tell VM about holes in nodes · 485761bd
    Andi Kleen authored
    Some nodes can have large holes on x86-64.
    
    This fixes problems with the VM allowing too many dirty pages because it
    overestimates the number of available RAM in a node.  In extreme cases you
    can end up with all RAM filled with dirty pages which can lead to deadlocks
    and other nasty behaviour.
    
    This patch just tells the VM about the known holes from e820.  Reserved
    (like the kernel text or mem_map) is still not taken into account, but that
    should be only a few percent error now.
    
    Small detail is that the flat setup uses the NUMA free_area_init_node() now
    too because it offers more flexibility.
    
    (akpm: lotsa thanks to Martin for working this problem out)
    
    Cc: Martin Bligh <mbligh@mbligh.org>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    485761bd
numa.c 8.26 KB