• Tejun Heo's avatar
    x86-64, NUMA: consolidate and improve memblk sanity checks · 56e827fb
    Tejun Heo authored
    memblk sanity check was scattered around and incomplete.  Consolidate
    and improve.
    
    * Confliction detection and cutoff_node() logic are moved to
      numa_cleanup_meminfo().
    
    * numa_cleanup_meminfo() clears the unused memblks before returning.
    
    * Check and warn about invalid input parameters in numa_add_memblk().
    
    * Check the maximum number of memblk isn't exceeded in
      numa_add_memblk().
    
    * numa_cleanup_meminfo() is now called before numa_emulation() so that
      the emulation code also uses the cleaned up version.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Cyrill Gorcunov <gorcunov@gmail.com>
    Cc: Shaohui Zheng <shaohui.zheng@intel.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: H. Peter Anvin <hpa@linux.intel.com>
    56e827fb
numa_64.c 24.5 KB