swap(3): document permissions and encryption behaviour, reference to memory(8)

This commit is contained in:
cinap_lenrek 2017-10-30 01:55:58 +01:00
parent 7e619e59e4
commit e436a529cd

View file

@ -1,6 +1,6 @@
.TH SWAP 3 .TH SWAP 3
.SH NAME .SH NAME
swap \- memory usage statistics and pagefile control swap \- memory usage statistics and swap file control
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B bind -a #¶ /dev .B bind -a #¶ /dev
@ -20,11 +20,13 @@ device holds a text block giving memory usage statistics:
\fIn\fP/\fIm\fP swap \fIn\fP/\fIm\fP swap
\fIa\fP/\fIn\fP/\fIm\fP kernel malloc \fIa\fP/\fIn\fP/\fIm\fP kernel malloc
\fIa\fP/\fIn\fP/\fIm\fP kernel draw \fIa\fP/\fIn\fP/\fIm\fP kernel draw
\fIa\fP/\fIn\fP/\fIm\fP kernel secret
.EE .EE
.PP .PP
These are total memory (bytes), system page size (bytes), These are total memory (bytes), system page size (bytes),
kernel memory (pages), user memory (pages), swap space (pages), kernel memory (pages), user memory (pages), swap space (pages),
kernel malloced data (bytes), and kernel graphics data (bytes). kernel malloced data (bytes), kernel graphics data (bytes)
and kernel secret data (bytes).
The expression The expression
.IR n / m .IR n / m
indicates indicates
@ -40,7 +42,11 @@ These numbers are not blank padded.
To turn on swapping, write to To turn on swapping, write to
.B swap .B swap
the textual file descriptor number of a file or device on which to swap. the textual file descriptor number of a file or device on which to swap.
.PP
Only the hostowner is allowed to enable swapping. The pages written to
the swap file are transparently encrypted by the kernel using a random key.
.SH SEE ALSO .SH SEE ALSO
.IR memory (8),
.IR swap (8). .IR swap (8).
.SH SOURCE .SH SOURCE
.B /sys/src/9/port/devswap.c .B /sys/src/9/port/devswap.c