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
This commit is contained in:
parent
3467f88cd6
commit
b0b22f297f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312648
@ -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 ,
|
||||
|
Loading…
Reference in New Issue
Block a user