aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kravetz <mike.kravetz@oracle.com>2015-04-15 19:13:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 19:35:18 -0400
commit8c9b97033547834404a58ea88da7226ed5167726 (patch)
tree46339349e69278b78d3f9ae8c2002159b6024071
parent7ca02d0ae586fe7df59632966a64f3f1a756ef05 (diff)
hugetlbfs: document min_size mount option and cleanup
Add min_size mount option to the hugetlbfs documentation. Also, add the missing pagesize option and mention that size can be specified as bytes or a percentage of huge page pool. 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/vm/hugetlbpage.txt31
1 files changed, 22 insertions, 9 deletions
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index f2d3a100fe38..b32b9cd50c0e 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -267,21 +267,34 @@ call, then it is required that system administrator mount a file system of
267type hugetlbfs: 267type hugetlbfs:
268 268
269 mount -t hugetlbfs \ 269 mount -t hugetlbfs \
270 -o uid=<value>,gid=<value>,mode=<value>,size=<value>,nr_inodes=<value> \ 270 -o uid=<value>,gid=<value>,mode=<value>,pagesize=<value>,size=<value>,\
271 none /mnt/huge 271 min_size=<value>,nr_inodes=<value> none /mnt/huge
272 272
273This command mounts a (pseudo) filesystem of type hugetlbfs on the directory 273This command mounts a (pseudo) filesystem of type hugetlbfs on the directory
274/mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid 274/mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid
275options sets the owner and group of the root of the file system. By default 275options sets the owner and group of the root of the file system. By default
276the uid and gid of the current process are taken. The mode option sets the 276the uid and gid of the current process are taken. The mode option sets the
277mode of root of file system to value & 01777. This value is given in octal. 277mode of root of file system to value & 01777. This value is given in octal.
278By default the value 0755 is picked. The size option sets the maximum value of 278By default the value 0755 is picked. If the paltform supports multiple huge
279memory (huge pages) allowed for that filesystem (/mnt/huge). The size is 279page sizes, the pagesize option can be used to specify the huge page size and
280rounded down to HPAGE_SIZE. The option nr_inodes sets the maximum number of 280associated pool. pagesize is specified in bytes. If pagesize is not specified
281inodes that /mnt/huge can use. If the size or nr_inodes option is not 281the paltform's default huge page size and associated pool will be used. The
282provided on command line then no limits are set. For size and nr_inodes 282size option sets the maximum value of memory (huge pages) allowed for that
283options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For 283filesystem (/mnt/huge). The size option can be specified in bytes, or as a
284example, size=2K has the same meaning as size=2048. 284percentage of the specified huge page pool (nr_hugepages). The size is
285rounded down to HPAGE_SIZE boundary. The min_size option sets the minimum
286value of memory (huge pages) allowed for the filesystem. min_size can be
287specified in the same way as size, either bytes or a percentage of the
288huge page pool. At mount time, the number of huge pages specified by
289min_size are reserved for use by the filesystem. If there are not enough
290free huge pages available, the mount will fail. As huge pages are allocated
291to the filesystem and freed, the reserve count is adjusted so that the sum
292of allocated and reserved huge pages is always at least min_size. The option
293nr_inodes sets the maximum number of inodes that /mnt/huge can use. If the
294size, min_size or nr_inodes option is not provided on command line then
295no limits are set. For pagesize, size, min_size and nr_inodes options, you
296can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For example, size=2K
297has the same meaning as size=2048.
285 298
286While read system calls are supported on files that reside on hugetlb 299While read system calls are supported on files that reside on hugetlb
287file systems, write system calls are not. 300file systems, write system calls are not.