LKML Archive on
help / color / mirror / Atom feed
From: Mike Kravetz <>
To: Andi Kleen <>
	Andrew Morton <>,
	Davidlohr Bueso <>,
	Aneesh Kumar <>,
	Joonsoo Kim <>
Subject: Re: [PATCH 0/4] hugetlbfs: optionally reserve all fs pages at mount time
Date: Fri, 06 Mar 2015 14:30:37 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 03/06/2015 02:13 PM, Andi Kleen wrote:
> Mike Kravetz <> writes:
>> 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.
> What's the difference of this new option to simply doing
> mount -t hugetlbfs none /huge
> echo XXX > /proc/sys/vm/nr_hugepages

In the above sequence, it is still possible for another user/application
to allocate some (or all) of the XXX huge pages.  There is no guarantee
that users of the filesystem will get all XXX pages.

I see the use of the reserve option to be:
# Make sure there are XXX huge pages in the global pool
echo XXX > /proc/sys/vm/nr_hugepages
# Mount/create the filesystem and reserve XXX huge pages
mount -t hugetlbfs -o size=XXX,reserve=XXX none /huge

If the mount is successful, then users of the filesystem know their are
XXX huge pages available for their use.

Mike Kravetz

      reply	other threads:[~2015-03-06 22:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 0/4] hugetlbfs: optionally reserve all fs pages at mount time' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).