• Nishanth Aravamudan's avatar
    hugetlb: fix pool shrinking while in restricted cpuset · 348e1e04
    Nishanth Aravamudan authored
    
    
    Adam Litke noticed that currently we grow the hugepage pool independent of any
    cpuset the running process may be in, but when shrinking the pool, the cpuset
    is checked.  This leads to inconsistency when shrinking the pool in a
    restricted cpuset -- an administrator may have been able to grow the pool on a
    node restricted by a containing cpuset, but they cannot shrink it there.
    
    There are two options: either prevent growing of the pool outside of the
    cpuset or allow shrinking outside of the cpuset.  >From previous discussions
    on linux-mm, /proc/sys/vm/nr_hugepages is an administrative interface that
    should not be restricted by cpusets.  So allow shrinking the pool by removing
    pages from nodes outside of current's cpuset.
    Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
    Acked-by: default avatarAdam Litke <agl@us.ibm.com>
    Cc: William Irwin <wli@holomorphy.com>
    Cc: Lee Schermerhorn <Lee.Schermerhonr@hp.com>
    Cc: Christoph Lameter <clameter@sgi.com>
    Cc: Paul Jackson <pj@sgi.com>
    Cc: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    348e1e04