From b0b22f297f3126641960d9ab801a63f376918fd8 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 22 Jan 2017 19:46:14 +0000 Subject: [PATCH] Editing and clarifications for tmpfs(5). Submitted by: wblock Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D9211 --- share/man/man5/tmpfs.5 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 6374b092564d..a95e12e8d0e3 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -77,7 +77,7 @@ tmpfs_load="YES" .Sh DESCRIPTION The .Nm -driver implements in-memory, or +driver implements an in-memory, or .Tn tmpfs file system. The filesystem stores both file metadata and data in main memory. @@ -85,22 +85,22 @@ This allows very fast and low latency accesses to the data. The data is volatile. An umount or system reboot invalidates it. These properties make the filesystem's mounts suitable for fast -scratch storage, e.g. +scratch storage, like .Pa /tmp . .Pp If the system becomes low on memory and swap is configured (see .Xr swapon 8 ), -file data may be written to the swap space, freeing memory +the system can transfer file data to swap space, freeing memory for other needs. -The current implementation never swaps out metadata, including -the directory content. +Metadata, including the directory content, is never swapped out by the +current implementation. Keep this in mind when planning the mount limits, especially when expecting to place many small files on a tmpfs mount. .Pp -When a file from a tmpfs mount is mmaped (see -.Xr mmap 2 ) -into the process address space, the swap VM object which manages the file -pages is used to implement mapping and to avoid double-copying of +When +.Xr mmap 2 +is used on a file from a tmpfs mount, the swap VM object managing the +file pages is used to implement mapping and avoid double-copying of the file data. This quirk causes process inspection tools, like .Xr procstat 1 ,