]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man5/tmpfs.5
getrlimit.2: Correct information about large limits on 32-bit architectures
[thirdparty/man-pages.git] / man5 / tmpfs.5
index 85f7ab5f26d10790a0e00033b2d4e3f8a7ffdc6a..b04b87f466f8bb15d1a65d156672f45a58dbb8df 100644 (file)
@@ -22,7 +22,7 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH TMPFS 5 2017-05-03 "Linux" "Linux Programmer's Manual"
+.TH TMPFS 5 2018-02-09 "Linux" "Linux Programmer's Manual"
 .SH NAME
 tmpfs \- a virtual memory filesystem
 .SH DESCRIPTION
@@ -71,7 +71,7 @@ filesystem supports the following mount options:
 .BR size "=\fIbytes\fP"
 Specify an upper limit on the size of the filesystem.
 The size is given in bytes, and rounded up to entire pages.
-
+.IP
 The size may have a
 .BR k ,
 .BR m ,
@@ -79,17 +79,23 @@ or
 .B g
 suffix for Ki, Mi, Gi (binary kilo (kibi), binary mega (mebi) and binary giga
 (gibi)).
-
+.IP
 The size may also have a % suffix to limit this instance to a percentage of
 physical RAM.
-
-The default, when neither size nor nr_blocks is specified, is size=50%.
+.IP
+The default, when neither
+.B size
+nor
+.B nr_blocks
+is specified, is
+.IR size=50% .
 .TP
 .BR nr_blocks "=\fIblocks\fP"
 The same as
 .BR size ,
-but in blocks of PAGE_CACHE_SIZE.
-
+but in blocks of
+.BR PAGE_CACHE_SIZE .
+.IP
 Blocks may be specified with
 .BR k ,
 .BR m ,
@@ -103,7 +109,7 @@ but not a % suffix.
 The maximum number of inodes for this instance.
 The default is half of the number of your physical RAM pages, or (on a
 machine with highmem) the number of lowmem RAM pages, whichever is smaller.
-
+.IP
 Inodes may be specified with
 .BR k ,
 .BR m ,
@@ -126,15 +132,85 @@ Set the initial group ID of the root directory.
 .\" commit 099445b489625b80b1d6687c9b6072dbeaca4096
 Set the initial user ID of the root directory.
 .TP
-.BR huge "=\fI[never|always|within_size|advise|deny|force]\fR (since Linux 4.7.0)"
+.BR huge "=\fIhuge_option\fR (since Linux 4.7.0)"
 .\" commit 5a6e75f8110c97e2a5488894d4e922187e6cb343
 Set the huge table memory allocation policy for all files in this instance (if
-CONFIG_TRANSPARENT_HUGE_PAGECACHE is enabled).
+.B CONFIG_TRANSPARENT_HUGE_PAGECACHE
+is enabled).
+.IP
+The
+.I huge_option
+value is one of the following:
+.RS
+.TP
+.B never
+Do not allocate huge pages.
+This is the default.
+.TP
+.B always
+Attempt to allocate huge pages every time a new page is needed.
+.TP
+.B within_size
+Only allocate huge page if it will be fully within
+.IR i_size .
+Also respect
+.BR fadvise (2)/ madvise (2)
+hints
+.TP
+.B advise
+Only allocate huge pages if requested with
+.BR fadvise (2)/ madvise (2).
 .TP
-.BR mpol "=\fI[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList]\fR (since Linux 2.6.15)"
+.B deny
+For use in emergencies, to force the huge option off from all mounts.
+.TP
+.B force
+Force the huge option on for all mounts; useful for testing.
+.RE
+.TP
+.BR mpol "=\fImpol_option\fR (since Linux 2.6.15)"
 .\" commit 7339ff8302fd70aabf5f1ae26e0c4905fa74a495
 Set the NUMA memory allocation policy for all files in this instance (if
-CONFIG_NUMA is enabled).
+.B CONFIG_NUMA
+is enabled).
+.IP
+The
+.I mpol_option
+value is one of the following:
+.RS
+.TP
+.B default
+Use the process allocation policy (see
+.BR set_mempolicy (2)).
+.TP
+.BR prefer ":\fInode\fP"
+Preferably allocate memory from the given
+.IR node .
+.TP
+.BR bind ":\fInodelist\fP"
+Allocate memory only from nodes in
+.IR nodelist .
+.TP
+.B interleave
+Allocate from each node in turn.
+.TP
+.BR interleave ":\fInodelist\fP"
+Allocate from each node of
+.I in
+turn.
+.TP
+.B local
+Preferably allocate memory from the local node.
+.RE
+.IP
+In the above,
+.I nodelist
+is a comma-separated list of decimal numbers and ranges
+that specify NUMA nodes.
+A range is a pair of hyphen-separated decimal numbers,
+the smallest and largest node numbers in the range.
+For example,
+.IR mpol=bind:0\-3,5,7,9\-15 .
 .SH VERSIONS
 The
 .B tmpfs
@@ -143,11 +219,6 @@ facility was added in Linux 2.4, as a successor to the older
 facility, which did not provide limit checking or
 allow for the use of swap space.
 .SH NOTES
-For a description of the mount options that may be employed when mounting a
-.B tmpfs
-filesystem, see
-.BR mount (8).
-.PP
 In order for user-space tools and applications to create
 .B tmpfs
 filesystems, the kernel must be configured with the
@@ -181,7 +252,7 @@ A
 .B tmpfs
 filesystem mounted at
 .IR /dev/shm
-as used for the implementation of POSIX shared memory
+is used for the implementation of POSIX shared memory
 .RB ( shm_overview (7))
 and POSIX semaphores
 .RB ( sem_overview (7)).
@@ -206,8 +277,11 @@ facility was formerly called
 .BR du (1),
 .BR memfd_create (2),
 .BR mmap (2),
+.BR set_mempolicy (2),
 .BR shm_open (3),
 .BR mount (8)
 .PP
-The kernel source file
-.IR Documentation/filesystems/tmpfs.txt .
+The kernel source files
+.IR Documentation/filesystems/tmpfs.txt
+and
+.IR Documentation/admin-guide/mm/transhuge.rst .