Lines Matching +full:on +full:- +full:the +full:- +full:fly
1 .. SPDX-License-Identifier: GPL-2.0
10 Everything in tmpfs is temporary in the sense that no files will be
11 created on your hard drive. If you unmount a tmpfs instance,
14 tmpfs puts everything into the kernel internal caches and grows and
15 shrinks to accommodate the files it contains and is able to swap
16 unneeded pages out to swap space, if swap was enabled for the tmpfs
20 explained further below, some of which can be reconfigured dynamically on the
21 fly using a remount ('mount -o remount ...') of the filesystem. A tmpfs
23 usage. tmpfs also supports POSIX ACLs, and extended attributes for the
25 cannot modify any parameter for a ramfs filesystem. The size limit of a ramfs
31 To write data you would just then need to create an regular filesystem on top
34 Contrary to brd ramdisks, tmpfs has its own filesystem, it does not rely on the
37 Since tmpfs lives completely in the page cache and optionally on swap,
40 (shmem, see ipcs(1)). The most reliable way to get the count is
43 tmpfs has the following uses:
49 This mount does not depend on CONFIG_TMPFS. If CONFIG_TMPFS is not
50 set, the user visible part of tmpfs is not built. But the internal
54 POSIX shared memory (shm_open, shm_unlink). Adding the following
59 Remember to create the directory that you intend to mount tmpfs on
62 This mount is _not_ needed for SYSV shared memory. The internal
63 mount is used for that. (In the 2.3 kernel versions it was
64 necessary to mount the predecessor of tmpfs (shm fs) to use SYSV
68 e.g. on /tmp and /var/tmp and have a big swap partition. And now
72 4) And probably a lot more I do not know about :-)
78 size The limit of allocated bytes for this tmpfs instance. The
80 oversize your tmpfs instances the machine will deadlock
81 since the OOM handler will not be able to free that memory.
82 nr_blocks The same as size, but in blocks of PAGE_SIZE.
83 nr_inodes The maximum number of inodes for this instance. The default
84 is half of the number of your physical RAM pages, or (on a
85 machine with highmem) the number of lowmem RAM pages,
86 whichever is the lower.
90 can be changed on remount. The size parameter also accepts a suffix %
92 the default, when neither size nor nr_blocks is specified, is size=50%
97 use up all the memory on the machine; but enhances the scalability of
101 extended attributes: "df -i"'s IUsed and IUse% increase, IFree decreases.
107 noswap Disables swap. Remounts must respect the original settings.
114 The mount options for this are:
117 huge=never Do not allocate huge pages. This is the default.
124 See also Documentation/admin-guide/mm/transhuge.rst, which describes the
126 be used to deny huge pages on all tmpfs mounts in an emergency, or to
127 force huge pages on all tmpfs mounts for testing.
129 tmpfs also supports quota with the following mount options
133 is enabled on the mount. Tmpfs is using hidden
134 system quota files that are initialized on mount.
136 on the mount.
138 on the mount.
145 None of the quota related mount options can be set or changed on remount.
148 and can't be changed on remount. Default global quota limits are taking
149 effect for any and all user/group/project except root the first time the
150 quota entry for user/group/project id is being accessed - typically the
152 the mount. In other words, instead of the limits being initialized to zero,
153 they are initialized with the particular value provided with these mount
154 options. The limits can be changed for any user/group id at any time as they
160 tmpfs has a mount option to set the NUMA memory allocation policy for
161 all files in that instance (if CONFIG_NUMA is enabled) - which can be
162 adjusted on the fly via 'mount -o remount ...'
165 mpol=default use the process allocation policy
167 mpol=prefer:Node prefers to allocate memory from the given Node
171 mpol=local prefers to allocate memory from the local node
174 NodeList format is a comma-separated list of decimal numbers and ranges,
175 a range being two hyphen-separated decimal numbers, the smallest and
176 largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15
179 use at file creation time. When a task allocates a file in the file
180 system, the mount option memory policy will be applied with a NodeList,
181 if any, modified by the calling task's cpuset constraints
182 [See Documentation/admin-guide/cgroup-v1/cpusets.rst] and any optional flags,
183 listed below. If the resulting NodeLists is the empty set, the effective
184 memory policy for the file will revert to "default" policy.
188 when tmpfs is mounted by appending them to the mode before the NodeList.
189 See Documentation/admin-guide/mm/numa_memory_policy.rst for a list of
190 all available memory allocation policy mode flags and their effect on
198 For example, mpol=bind=static:NodeList, is the equivalent of an
201 Note that trying to mount a tmpfs with an mpol option will fail if the
203 specifies a node which is not online. If your system relies on that
206 online, then it is advisable to omit the mpol option from automatic
207 mount options. It can be added later, when the tmpfs is already mounted
208 on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'.
211 To specify the initial root directory you can use the following mount
215 mode The permissions as an octal number
216 uid The user id
217 gid The group id
220 These options do not have any effect on remount. You can change these
221 parameters with chmod(1), chown(1) and chgrp(1) on a mounted filesystem.
224 tmpfs has a mount option to select whether it will wrap at 32- or 64-bit inode
228 inode64 Use 64-bit inode numbers
229 inode32 Use 32-bit inode numbers
232 On a 32-bit kernel, inode32 is implicit, and inode64 is refused at mount time.
233 On a 64-bit kernel, CONFIG_TMPFS_INODE64 sets the default. inode64 avoids the
234 possibility of multiple files with the same inode number on a single device;
235 but risks glibc failing with EOVERFLOW once 33-bit inode numbers are reached -
236 if a long-lived tmpfs is accessed by 32-bit applications so ancient that
240 So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'
241 will give you tmpfs instance on /mytmpfs which can allocate 10GB