LKML Archive on
help / color / mirror / Atom feed
From: Mike Kravetz <>
Cc: Andrew Morton <>,
	Davidlohr Bueso <>,
	Aneesh Kumar <>,
	Joonsoo Kim <>,
	Mike Kravetz <>
Subject: [PATCH 4/4] hugetlbfs: document reserved mount option
Date: Tue,  3 Mar 2015 17:21:46 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Update documentation for the hugetlbfs reserved mount option.

Signed-off-by: Mike Kravetz <>
 Documentation/vm/hugetlbpage.txt | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index f2d3a10..1d88bfb 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -267,8 +267,8 @@ call, then it is required that system administrator mount a file system of
 type hugetlbfs:
   mount -t hugetlbfs \
-	-o uid=<value>,gid=<value>,mode=<value>,size=<value>,nr_inodes=<value> \
-	none /mnt/huge
+	-o uid=<value>,gid=<value>,mode=<value>,size=<value>,reserved,\
+	nr_inodes=<value> none /mnt/huge
 This command mounts a (pseudo) filesystem of type hugetlbfs on the directory
 /mnt/huge.  Any files created on /mnt/huge uses huge pages.  The uid and gid
@@ -277,11 +277,15 @@ the uid and gid of the current process are taken.  The mode option sets the
 mode of root of file system to value & 01777.  This value is given in octal.
 By default the value 0755 is picked. The size option sets the maximum value of
 memory (huge pages) allowed for that filesystem (/mnt/huge). The size is
-rounded down to HPAGE_SIZE.  The option nr_inodes sets the maximum number of
-inodes that /mnt/huge can use.  If the size or nr_inodes option is not
-provided on command line then no limits are set.  For size and nr_inodes
-options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For
-example, size=2K has the same meaning as size=2048.
+rounded down to HPAGE_SIZE.  If the size option is specified, the reserved
+option may also be specified to reserve the number of huge pages required for
+the maximum filesystem size.  This number of huge pages is reserved at mount
+time and will be available for exclusive use by the filesystem.  If not enough
+huge pages are available, the mount will fail.  The option nr_inodes sets
+the maximum number of inodes that /mnt/huge can use.  If the size or nr_inodes
+option is not provided on command line then no limits are set.  For size and
+nr_inodes options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo.
+For example, size=2K has the same meaning as size=2048.
 While read system calls are supported on files that reside on hugetlb
 file systems, write system calls are not.

  parent reply	other threads:[~2015-03-04  1:22 UTC|newest]

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

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 4/4] hugetlbfs: document reserved mount option' \

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