LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/4] hugetlbfs: optionally reserve all fs pages at mount time
@ 2015-03-04  1:21 Mike Kravetz
  2015-03-04  1:21 ` [PATCH 1/4] hugetlbfs: add reserved mount fields to subpool structure Mike Kravetz
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Mike Kravetz @ 2015-03-04  1:21 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Andrew Morton, Davidlohr Bueso, Aneesh Kumar, Joonsoo Kim, Mike Kravetz

hugetlbfs allocates huge pages from the global pool as needed.  Even if
the global pool contains a sufficient number pages for the filesystem
size at mount time, those global pages could be grabbed for some other
use.  As a result, filesystem huge page allocations may fail due to lack
of pages.

Applications such as a database want to use huge pages for performance
reasons.  hugetlbfs filesystem semantics with ownership and modes work
well to manage access to a pool of huge pages.  However, the application
would like some reasonable assurance that allocations will not fail due
to a lack of huge pages.  At application startup time, the application
would like to configure itself to use a specific number of huge pages.
Before starting, the application will can check to make sure that enough
huge pages exist in the system global pools.  What the application wants
is exclusive use of a subpool of huge pages. 

Add a new hugetlbfs mount option 'reserved' to specify that the number
of pages associated with the size of the filesystem will be reserved.  If
there are insufficient pages, the mount will fail.  The reservation is
maintained for the duration of the filesystem so that as pages are
allocated and free'ed a sufficient number of pages remains reserved.

Comments from RFC addressed/incorporated

Mike Kravetz (4):
  hugetlbfs: add reserved mount fields to subpool structure
  hugetlbfs: coordinate global and subpool reserve accounting
  hugetlbfs: accept subpool reserved option and setup accordingly
  hugetlbfs: document reserved mount option

 Documentation/vm/hugetlbpage.txt | 18 ++++++++------
 fs/hugetlbfs/inode.c             | 15 ++++++++++--
 include/linux/hugetlb.h          |  7 ++++++
 mm/hugetlb.c                     | 53 +++++++++++++++++++++++++++++++++-------
 4 files changed, 75 insertions(+), 18 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-06 22:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04  1:21 [PATCH 0/4] hugetlbfs: optionally reserve all fs pages at mount time Mike Kravetz
2015-03-04  1:21 ` [PATCH 1/4] hugetlbfs: add reserved mount fields to subpool structure Mike Kravetz
2015-03-04  1:21 ` [PATCH 2/4] hugetlbfs: coordinate global and subpool reserve accounting Mike Kravetz
2015-03-04  1:21 ` [PATCH 3/4] hugetlbfs: accept subpool reserved option and setup accordingly Mike Kravetz
2015-03-04  1:21 ` [PATCH 4/4] hugetlbfs: document reserved mount option Mike Kravetz
2015-03-04  5:49 ` [PATCH 0/4] hugetlbfs: optionally reserve all fs pages at mount time David Rientjes
2015-03-04 17:21   ` Mike Kravetz
2015-03-06 22:13 ` Andi Kleen
2015-03-06 22:30   ` Mike Kravetz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).