]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hugetlbfs: add minimum size accounting to subpools
authorMike Kravetz <mike.kravetz@oracle.com>
Tue, 7 Apr 2015 23:44:29 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:29 +0000 (09:44 +1000)
commitbfeaeb6c5c3423d68675b97ff554435a19c345c7
tree5c0f73fcf2c6bf632b864483664a265d2ffbfb33
parentdc6ce36615e7f958ce7ffbb42096365c853c57a8
hugetlbfs: add minimum size accounting to subpools

The same routines that perform subpool maximum size accounting
hugepage_subpool_get/put_pages() are modified to also perform minimum size
accounting.  When a delta value is passed to these routines, calculate how
global reservations must be adjusted to maintain the subpool minimum size.
 The routines now return this global reserve count adjustment.  This
global reserve count adjustment is then passed to the global accounting
routine hugetlb_acct_memory().

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c