sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget%/translations/zh_CN/filesystems/tmpfsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/zh_TW/filesystems/tmpfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/it_IT/filesystems/tmpfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ja_JP/filesystems/tmpfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ko_KR/filesystems/tmpfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/sp_SP/filesystems/tmpfsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh?/var/lib/git/docbuild/linux/Documentation/filesystems/tmpfs.rsthKubhsection)}(hhh](htitle)}(hTmpfsh]hTmpfs}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hFTmpfs is a file system which keeps all of its files in virtual memory.h]hFTmpfs is a file system which keeps all of its files in virtual memory.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hEverything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost.h]hEverything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(htmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space, if swap was enabled for the tmpfs mount. tmpfs also supports THP.h]htmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space, if swap was enabled for the tmpfs mount. tmpfs also supports THP.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXtmpfs extends ramfs with a few userspace configurable options listed and explained further below, some of which can be reconfigured dynamically on the fly using a remount ('mount -o remount ...') of the filesystem. A tmpfs filesystem can be resized but it cannot be resized to a size below its current usage. tmpfs also supports POSIX ACLs, and extended attributes for the trusted.*, security.* and user.* namespaces. ramfs does not use swap and you cannot modify any parameter for a ramfs filesystem. The size limit of a ramfs filesystem is how much memory you have available, and so care must be taken if used so to not run out of memory.h]hXtmpfs extends ramfs with a few userspace configurable options listed and explained further below, some of which can be reconfigured dynamically on the fly using a remount (‘mount -o remount ...’) of the filesystem. A tmpfs filesystem can be resized but it cannot be resized to a size below its current usage. tmpfs also supports POSIX ACLs, and extended attributes for the trusted.*, security.* and user.* namespaces. ramfs does not use swap and you cannot modify any parameter for a ramfs filesystem. The size limit of a ramfs filesystem is how much memory you have available, and so care must be taken if used so to not run out of memory.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXAn alternative to tmpfs and ramfs is to use brd to create RAM disks (/dev/ram*), which allows you to simulate a block device disk in physical RAM. To write data you would just then need to create an regular filesystem on top this ramdisk. As with ramfs, brd ramdisks cannot swap. brd ramdisks are also configured in size at initialization and you cannot dynamically resize them. Contrary to brd ramdisks, tmpfs has its own filesystem, it does not rely on the block layer at all.h]hXAn alternative to tmpfs and ramfs is to use brd to create RAM disks (/dev/ram*), which allows you to simulate a block device disk in physical RAM. To write data you would just then need to create an regular filesystem on top this ramdisk. As with ramfs, brd ramdisks cannot swap. brd ramdisks are also configured in size at initialization and you cannot dynamically resize them. Contrary to brd ramdisks, tmpfs has its own filesystem, it does not rely on the block layer at all.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX&Since tmpfs lives completely in the page cache and optionally on swap, all tmpfs pages will be shown as "Shmem" in /proc/meminfo and "Shared" in free(1). Notice that these counters also include shared memory (shmem, see ipcs(1)). The most reliable way to get the count is using df(1) and du(1).h]hX.Since tmpfs lives completely in the page cache and optionally on swap, all tmpfs pages will be shown as “Shmem” in /proc/meminfo and “Shared” in free(1). Notice that these counters also include shared memory (shmem, see ipcs(1)). The most reliable way to get the count is using df(1) and du(1).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubh)}(htmpfs has the following uses:h]htmpfs has the following uses:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubhenumerated_list)}(hhh](h list_item)}(hX0There is always a kernel internal mount which you will not see at all. This is used for shared anonymous mappings and SYSV shared memory. This mount does not depend on CONFIG_TMPFS. If CONFIG_TMPFS is not set, the user visible part of tmpfs is not built. But the internal mechanisms are always present. h](h)}(hThere is always a kernel internal mount which you will not see at all. This is used for shared anonymous mappings and SYSV shared memory.h]hThere is always a kernel internal mount which you will not see at all. This is used for shared anonymous mappings and SYSV shared memory.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hj4ubh)}(hThis mount does not depend on CONFIG_TMPFS. If CONFIG_TMPFS is not set, the user visible part of tmpfs is not built. But the internal mechanisms are always present.h]hThis mount does not depend on CONFIG_TMPFS. If CONFIG_TMPFS is not set, the user visible part of tmpfs is not built. But the internal mechanisms are always present.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj4ubeh}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(hXglibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink). Adding the following line to /etc/fstab should take care of this:: tmpfs /dev/shm tmpfs defaults 0 0 Remember to create the directory that you intend to mount tmpfs on if necessary. This mount is _not_ needed for SYSV shared memory. The internal mount is used for that. (In the 2.3 kernel versions it was necessary to mount the predecessor of tmpfs (shm fs) to use SYSV shared memory.) h](h)}(hglibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink). Adding the following line to /etc/fstab should take care of this::h]hglibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink). Adding the following line to /etc/fstab should take care of this:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjZubh literal_block)}(h3tmpfs /dev/shm tmpfs defaults 0 0h]h3tmpfs /dev/shm tmpfs defaults 0 0}hjnsbah}(h]h ]h"]h$]h&]hhuh1jlhhhK9hjZubh)}(hPRemember to create the directory that you intend to mount tmpfs on if necessary.h]hPRemember to create the directory that you intend to mount tmpfs on if necessary.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjZubh)}(hThis mount is _not_ needed for SYSV shared memory. The internal mount is used for that. (In the 2.3 kernel versions it was necessary to mount the predecessor of tmpfs (shm fs) to use SYSV shared memory.)h]hThis mount is _not_ needed for SYSV shared memory. The internal mount is used for that. (In the 2.3 kernel versions it was necessary to mount the predecessor of tmpfs (shm fs) to use SYSV shared memory.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjZubeh}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(hSome people (including me) find it very convenient to mount it e.g. on /tmp and /var/tmp and have a big swap partition. And now loop mounts of tmpfs files do work, so mkinitrd shipped by most distributions should succeed with a tmpfs /tmp. h]h)}(hSome people (including me) find it very convenient to mount it e.g. on /tmp and /var/tmp and have a big swap partition. And now loop mounts of tmpfs files do work, so mkinitrd shipped by most distributions should succeed with a tmpfs /tmp.h]hSome people (including me) find it very convenient to mount it e.g. on /tmp and /var/tmp and have a big swap partition. And now loop mounts of tmpfs files do work, so mkinitrd shipped by most distributions should succeed with a tmpfs /tmp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(h1And probably a lot more I do not know about :-) h]h)}(h/And probably a lot more I do not know about :-)h]h/And probably a lot more I do not know about :-)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1j-hhhhhhhK-ubh)}(h)tmpfs has three mount options for sizing:h]h)tmpfs has three mount options for sizing:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjxubj)}(hhh](j )}(hhh](j)}(hhh]h)}(h huge=neverh]h huge=never}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h1Do not allocate huge pages. This is the default.h]h1Do not allocate huge pages. This is the default.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(h huge=alwaysh]h huge=always}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h>Attempt to allocate huge page every time a new page is needed.h]h>Attempt to allocate huge page every time a new page is needed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hhuge=within_sizeh]hhuge=within_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hYOnly allocate huge page if it will be fully within i_size. Also respect madvise(2) hints.h]hYOnly allocate huge page if it will be fully within i_size. Also respect madvise(2) hints.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(h huge=adviseh]h huge=advise}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhj:ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h5Only allocate huge page if requested with madvise(2).h]h5Only allocate huge page if requested with madvise(2).}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjQubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]colsKuh1jhjuubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hXSee also Documentation/admin-guide/mm/transhuge.rst, which describes the sysfs file /sys/kernel/mm/transparent_hugepage/shmem_enabled: which can be used to deny huge pages on all tmpfs mounts in an emergency, or to force huge pages on all tmpfs mounts for testing.h]hXSee also Documentation/admin-guide/mm/transhuge.rst, which describes the sysfs file /sys/kernel/mm/transparent_hugepage/shmem_enabled: which can be used to deny huge pages on all tmpfs mounts in an emergency, or to force huge pages on all tmpfs mounts for testing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hhhhubh)}(h:tmpfs also supports quota with the following mount optionsh]h:tmpfs also supports quota with the following mount options}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jhjubj)}(hhh](j )}(hhh](j)}(hhh]h)}(hquotah]hquota}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hUser and group quota accounting and enforcement is enabled on the mount. Tmpfs is using hidden system quota files that are initialized on mount.h]hUser and group quota accounting and enforcement is enabled on the mount. Tmpfs is using hidden system quota files that are initialized on mount.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(husrquotah]husrquota}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h>User quota accounting and enforcement is enabled on the mount.h]h>User quota accounting and enforcement is enabled on the mount.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hgrpquotah]hgrpquota}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(h?Group quota accounting and enforcement is enabled on the mount.h]h?Group quota accounting and enforcement is enabled on the mount.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(husrquota_block_hardlimith]husrquota_block_hardlimit}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjbubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h'Set global user quota block hard limit.h]h'Set global user quota block hard limit.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(husrquota_inode_hardlimith]husrquota_inode_hardlimit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h'Set global user quota inode hard limit.h]h'Set global user quota inode hard limit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hgrpquota_block_hardlimith]hgrpquota_block_hardlimit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h(Set global group quota block hard limit.h]h(Set global group quota block hard limit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hgrpquota_inode_hardlimith]hgrpquota_inode_hardlimit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h(Set global group quota inode hard limit.h]h(Set global group quota inode hard limit.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hINone of the quota related mount options can be set or changed on remount.h]hINone of the quota related mount options can be set or changed on remount.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX^Quota limit parameters accept a suffix k, m or g for kilo, mega and giga and can't be changed on remount. Default global quota limits are taking effect for any and all user/group/project except root the first time the quota entry for user/group/project id is being accessed - typically the first time an inode with a particular id ownership is being created after the mount. In other words, instead of the limits being initialized to zero, they are initialized with the particular value provided with these mount options. The limits can be changed for any user/group id at any time as they normally can be.h]hX`Quota limit parameters accept a suffix k, m or g for kilo, mega and giga and can’t be changed on remount. Default global quota limits are taking effect for any and all user/group/project except root the first time the quota entry for user/group/project id is being accessed - typically the first time an inode with a particular id ownership is being created after the mount. In other words, instead of the limits being initialized to zero, they are initialized with the particular value provided with these mount options. The limits can be changed for any user/group id at any time as they normally can be.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hNote that tmpfs quotas do not support user namespaces so no uid/gid translation is done if quotas are enabled inside user namespaces.h]hNote that tmpfs quotas do not support user namespaces so no uid/gid translation is done if quotas are enabled inside user namespaces.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(htmpfs has a mount option to set the NUMA memory allocation policy for all files in that instance (if CONFIG_NUMA is enabled) - which can be adjusted on the fly via 'mount -o remount ...'h]htmpfs has a mount option to set the NUMA memory allocation policy for all files in that instance (if CONFIG_NUMA is enabled) - which can be adjusted on the fly via ‘mount -o remount ...’}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1jhjubj)}(hhh](j )}(hhh](j)}(hhh]h)}(h mpol=defaulth]h mpol=default}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h8use the process allocation policy (see set_mempolicy(2))h]h8use the process allocation policy (see set_mempolicy(2))}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hmpol=prefer:Nodeh]hmpol=prefer:Node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h.prefers to allocate memory from the given Nodeh]h.prefers to allocate memory from the given Node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hmpol=bind:NodeListh]hmpol=bind:NodeList}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h,allocates memory only from nodes in NodeListh]h,allocates memory only from nodes in NodeList}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hmpol=interleaveh]hmpol=interleave}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(h*prefers to allocate from each node in turnh]h*prefers to allocate from each node in turn}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjbubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(hmpol=interleave:NodeListh]hmpol=interleave:NodeList}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h,allocates from each node of NodeList in turnh]h,allocates from each node of NodeList in turn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j)}(hhh]h)}(h mpol=localh]h mpol=local}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h.prefers to allocate memory from the local nodeh]h.prefers to allocate memory from the local node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hNodeList format is a comma-separated list of decimal numbers and ranges, a range being two hyphen-separated decimal numbers, the smallest and largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15h]hNodeList format is a comma-separated list of decimal numbers and ranges, a range being two hyphen-separated decimal numbers, the smallest and largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXA memory policy with a valid NodeList will be saved, as specified, for use at file creation time. When a task allocates a file in the file system, the mount option memory policy will be applied with a NodeList, if any, modified by the calling task's cpuset constraints [See Documentation/admin-guide/cgroup-v1/cpusets.rst] and any optional flags, listed below. If the resulting NodeLists is the empty set, the effective memory policy for the file will revert to "default" policy.h]hXA memory policy with a valid NodeList will be saved, as specified, for use at file creation time. When a task allocates a file in the file system, the mount option memory policy will be applied with a NodeList, if any, modified by the calling task’s cpuset constraints [See Documentation/admin-guide/cgroup-v1/cpusets.rst] and any optional flags, listed below. If the resulting NodeLists is the empty set, the effective memory policy for the file will revert to “default” policy.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXpNUMA memory allocation policies have optional flags that can be used in conjunction with their modes. These optional flags can be specified when tmpfs is mounted by appending them to the mode before the NodeList. See Documentation/admin-guide/mm/numa_memory_policy.rst for a list of all available memory allocation policy mode flags and their effect on memory policy.h]hXpNUMA memory allocation policies have optional flags that can be used in conjunction with their modes. These optional flags can be specified when tmpfs is mounted by appending them to the mode before the NodeList. See Documentation/admin-guide/mm/numa_memory_policy.rst for a list of all available memory allocation policy mode flags and their effect on memory policy.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjm)}(hy=static is equivalent to MPOL_F_STATIC_NODES =relative is equivalent to MPOL_F_RELATIVE_NODESh]hy=static is equivalent to MPOL_F_STATIC_NODES =relative is equivalent to MPOL_F_RELATIVE_NODES}hj*sbah}(h]h ]h"]h$]h&]hhuh1jlhhhKhhhhubh)}(huFor example, mpol=bind=static:NodeList, is the equivalent of an allocation policy of MPOL_BIND | MPOL_F_STATIC_NODES.h]huFor example, mpol=bind=static:NodeList, is the equivalent of an allocation policy of MPOL_BIND | MPOL_F_STATIC_NODES.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX/Note that trying to mount a tmpfs with an mpol option will fail if the running kernel does not support NUMA; and will fail if its nodelist specifies a node which is not online. If your system relies on that tmpfs being mounted, but from time to time runs a kernel built without NUMA capability (perhaps a safe recovery kernel), or with fewer nodes online, then it is advisable to omit the mpol option from automatic mount options. It can be added later, when the tmpfs is already mounted on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'.h]hX3Note that trying to mount a tmpfs with an mpol option will fail if the running kernel does not support NUMA; and will fail if its nodelist specifies a node which is not online. If your system relies on that tmpfs being mounted, but from time to time runs a kernel built without NUMA capability (perhaps a safe recovery kernel), or with fewer nodes online, then it is advisable to omit the mpol option from automatic mount options. It can be added later, when the tmpfs is already mounted on MountPoint, by ‘mount -o remount,mpol=Policy:NodeList MountPoint’.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hNTo specify the initial root directory you can use the following mount options:h]hNTo specify the initial root directory you can use the following mount options:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjeubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK"uh1jhjeubj)}(hhh](j )}(hhh](j)}(hhh]h)}(hmodeh]hmode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"The permissions as an octal numberh]h"The permissions as an octal number}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hj|ubj )}(hhh](j)}(hhh]h)}(huidh]huid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h The user idh]h The user id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hj|ubj )}(hhh](j)}(hhh]h)}(hgidh]hgid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h The group idh]h The group id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]colsKuh1jhjbubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hThese options do not have any effect on remount. You can change these parameters with chmod(1), chown(1) and chgrp(1) on a mounted filesystem.h]hThese options do not have any effect on remount. You can change these parameters with chmod(1), chown(1) and chgrp(1) on a mounted filesystem.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hWtmpfs has a mount option to select whether it will wrap at 32- or 64-bit inode numbers:h]hWtmpfs has a mount option to select whether it will wrap at 32- or 64-bit inode numbers:}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjV ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjV ubj)}(hhh](j )}(hhh](j)}(hhh]h)}(hinode64h]hinode64}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjs ubah}(h]h ]h"]h$]h&]uh1jhjp ubj)}(hhh]h)}(hUse 64-bit inode numbersh]hUse 64-bit inode numbers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjp ubeh}(h]h ]h"]h$]h&]uh1j hjm ubj )}(hhh](j)}(hhh]h)}(hinode32h]hinode32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hUse 32-bit inode numbersh]hUse 32-bit inode numbers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j hjm ubeh}(h]h ]h"]h$]h&]uh1jhjV ubeh}(h]h ]h"]h$]h&]colsKuh1jhjS ubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hXOn a 32-bit kernel, inode32 is implicit, and inode64 is refused at mount time. On a 64-bit kernel, CONFIG_TMPFS_INODE64 sets the default. inode64 avoids the possibility of multiple files with the same inode number on a single device; but risks glibc failing with EOVERFLOW once 33-bit inode numbers are reached - if a long-lived tmpfs is accessed by 32-bit applications so ancient that opening a file larger than 2GiB fails with EINVAL.h]hXOn a 32-bit kernel, inode32 is implicit, and inode64 is refused at mount time. On a 64-bit kernel, CONFIG_TMPFS_INODE64 sets the default. inode64 avoids the possibility of multiple files with the same inode number on a single device; but risks glibc failing with EOVERFLOW once 33-bit inode numbers are reached - if a long-lived tmpfs is accessed by 32-bit applications so ancient that opening a file larger than 2GiB fails with EINVAL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hSo 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' will give you tmpfs instance on /mytmpfs which can allocate 10GB RAM/SWAP in 10240 inodes and it is only accessible by root.h]hSo ‘mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs’ will give you tmpfs instance on /mytmpfs which can allocate 10GB RAM/SWAP in 10240 inodes and it is only accessible by root.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hMtmpfs has the following mounting options for case-insensitive lookup support:h]hMtmpfs has the following mounting options for case-insensitive lookup support:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jhj ubj)}(hhh](j )}(hhh](j)}(hhh]h)}(hcasefoldh]hcasefold}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj; ubah}(h]h ]h"]h$]h&]uh1jhj8 ubj)}(hhh]h)}(hEnable casefold support at this mount point using the given argument as the encoding standard. Currently only UTF-8 encodings are supported. If no argument is used, it will load the latest UTF-8 encoding available.h]hEnable casefold support at this mount point using the given argument as the encoding standard. Currently only UTF-8 encodings are supported. If no argument is used, it will load the latest UTF-8 encoding available.}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjR ubah}(h]h ]h"]h$]h&]uh1jhj8 ubeh}(h]h ]h"]h$]h&]uh1j hj5 ubj )}(hhh](j)}(hhh]h)}(hstrict_encodingh]hstrict_encoding}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjr ubah}(h]h ]h"]h$]h&]uh1jhjo ubj)}(hhh]h)}(hEnable strict encoding at this mount point (disabled by default). In this mode, the filesystem refuses to create file and directory with names containing invalid UTF-8 characters.h]hEnable strict encoding at this mount point (disabled by default). In this mode, the filesystem refuses to create file and directory with names containing invalid UTF-8 characters.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjo ubeh}(h]h ]h"]h$]h&]uh1j hj5 ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hXThis option doesn't render the entire filesystem case-insensitive. One needs to still set the casefold flag per directory, by flipping the +F attribute in an empty directory. Nevertheless, new directories will inherit the attribute. The mountpoint itself cannot be made case-insensitive.h]hX!This option doesn’t render the entire filesystem case-insensitive. One needs to still set the casefold flag per directory, by flipping the +F attribute in an empty directory. Nevertheless, new directories will inherit the attribute. The mountpoint itself cannot be made case-insensitive.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhhhubh)}(h Example::h]hExample:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhhhubjm)}(hw$ mount -t tmpfs -o casefold=utf8-12.1.0,strict_encoding fs_name /mytmpfs $ mount -t tmpfs -o casefold fs_name /mytmpfsh]hw$ mount -t tmpfs -o casefold=utf8-12.1.0,strict_encoding fs_name /mytmpfs $ mount -t tmpfs -o casefold fs_name /mytmpfs}hj sbah}(h]h ]h"]h$]h&]hhuh1jlhhhMhhhhubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhKubh field_body)}(h'Christoph Rohland , 1.12.01h]h)}(hj h](hChristoph Rohland <}(hj hhhNhNubh reference)}(h cr@sap.comh]h cr@sap.com}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:cr@sap.comuh1j hj ubh >, 1.12.01}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhM hj hhubj )}(hhh](j )}(hUpdatedh]hUpdated}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2 hhhKubj )}(hHugh Dickins, 4 June 2007h]h)}(hjE h]hHugh Dickins, 4 June 2007}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC ubah}(h]h ]h"]h$]h&]uh1j hj2 ubeh}(h]h ]h"]h$]h&]uh1j hhhM hj hhubj )}(hhh](j )}(hUpdatedh]hUpdated}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj` hhhKubj )}(hKOSAKI Motohiro, 16 Mar 2010h]h)}(hjs h]hKOSAKI Motohiro, 16 Mar 2010}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq ubah}(h]h ]h"]h$]h&]uh1j hj` ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hhh](j )}(hUpdatedh]hUpdated}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhKubj )}(hChris Down, 13 July 2020h]h)}(hj h]hChris Down, 13 July 2020}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hhh](j )}(hUpdatedh]hUpdated}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhKubj )}(hAndré Almeida, 23 Aug 2024h]h)}(hj h]hAndré Almeida, 23 Aug 2024}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubeh}(h]h ]h"]h$]h&]uh1j hhhhhhhM ubeh}(h]tmpfsah ]h"]tmpfsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}j hs footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.