summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man2/swapon.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/debian-unstable/man2/swapon.2
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/debian-unstable/man2/swapon.2')
-rw-r--r--upstream/debian-unstable/man2/swapon.229
1 files changed, 17 insertions, 12 deletions
diff --git a/upstream/debian-unstable/man2/swapon.2 b/upstream/debian-unstable/man2/swapon.2
index 400f6097..7d7fe41b 100644
--- a/upstream/debian-unstable/man2/swapon.2
+++ b/upstream/debian-unstable/man2/swapon.2
@@ -22,7 +22,7 @@
.\" Author: Rafael Aquini <aquini@redhat.com>
.\" Date: Wed Jul 3 15:02:46 2013 -0700
.\"
-.TH swapon 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH swapon 2 2024-05-02 "Linux man-pages 6.8"
.SH NAME
swapon, swapoff \- start/stop swapping to file/device
.SH LIBRARY
@@ -31,7 +31,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sys/swap.h>
-.PP
+.P
.BI "int swapon(const char *" path ", int " swapflags );
.BI "int swapoff(const char *" path );
.fi
@@ -42,7 +42,7 @@ sets the swap area to the file or block device specified by
.BR swapoff ()
stops swapping to the file or block device specified by
.IR path .
-.PP
+.P
If the
.B SWAP_FLAG_PREFER
flag is specified in the
@@ -52,13 +52,13 @@ argument, the new swap area will have a higher priority than default.
The priority is encoded within
.I swapflags
as:
-.PP
+.P
.in +4n
.EX
.I "(prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
.EE
.in
-.PP
+.P
If the
.B SWAP_FLAG_DISCARD
flag is specified in the
@@ -69,7 +69,7 @@ if the swap device supports the discard or trim operation.
(This may improve performance on some Solid State Devices,
but often it does not.)
See also NOTES.
-.PP
+.P
These functions may be used only by a privileged process (one having the
.B CAP_SYS_ADMIN
capability).
@@ -78,13 +78,13 @@ Each swap area has a priority, either high or low.
The default priority is low.
Within the low-priority areas,
newer areas are even lower priority than older areas.
-.PP
+.P
All priorities set with
.I swapflags
are high-priority, higher than default.
They may have any nonnegative value chosen by the caller.
Higher numbers mean higher priority.
-.PP
+.P
Swap pages are allocated from areas in priority order,
highest priority first.
For areas with different priorities,
@@ -92,7 +92,7 @@ a higher-priority area is exhausted before using a lower-priority area.
If two or more areas have the same priority,
and it is the highest priority available,
pages are allocated on a round-robin basis between them.
-.PP
+.P
As of Linux 1.3.6, the kernel usually follows these rules,
but there are exceptions.
.SH RETURN VALUE
@@ -156,7 +156,7 @@ argument was introduced in Linux 1.3.2.
.SH NOTES
The partition or path must be prepared with
.BR mkswap (8).
-.PP
+.P
There is an upper limit on the number of swap files that may be used,
defined by the kernel constant
.BR MAX_SWAPFILES .
@@ -164,7 +164,8 @@ Before Linux 2.4.10,
.B MAX_SWAPFILES
has the value 8;
since Linux 2.4.10, it has the value 32.
-Since Linux 2.6.18, the limit is decreased by 2 (thus: 30)
+Since Linux 2.6.18, the limit is decreased by 2 (thus 30),
+since Linux 5.19, the limit is decreased by 3 (thus: 29)
if the kernel is built with the
.B CONFIG_MIGRATION
option
@@ -180,7 +181,11 @@ Since Linux 5.14, the limit is further decreased by 4
if the kernel is built with the
.B CONFIG_DEVICE_PRIVATE
option.
-.PP
+Since Linux 5.19, the limit is further decreased by 1
+if the kernel is built with the
+.B CONFIG_PTE_MARKER
+option.
+.P
Discard of swap pages was introduced in Linux 2.6.29,
then made conditional
on the