Update text for EPERM error describing the maximum number of

swap files.  (From downstream Fedora patch.)
This commit is contained in:
Michael Kerrisk 2007-06-16 18:22:38 +00:00
parent 97bc00947f
commit 4db7cf5dbd
1 changed files with 17 additions and 4 deletions

View File

@ -31,8 +31,10 @@
.\" Modified 2004-06-17 by Michael Kerrisk <mtk-manpages@gmx.net>
.\" Modified 2004-10-10 by aeb
.\" 2004-12-14 mtk, Anand Kumria: added new errors
.\" 2007-06-22 Ivana Varekova <varekova@redhat.com>, mtk
.\" Update text describing limit on number of swap files.
.\"
.TH SWAPON 2 2004-10-10 "Linux" "Linux Programmer's Manual"
.TH SWAPON 2 2007-06-22 "Linux" "Linux Programmer's Manual"
.SH NAME
swapon, swapoff \- start/stop swapping to file/device
.SH SYNOPSIS
@ -135,9 +137,9 @@ The system has insufficient memory to start swapping.
.B EPERM
The caller does not have the
.B CAP_SYS_ADMIN
capability, or all
.B MAX_SWAPFILES
(earlier 8; 32 since Linux 2.4.10) are in use.
capability.
Alternatively, the maximum number of swap files are already in use;
see NOTES below.
.SH "CONFORMING TO"
These functions are Linux specific and should not be used in programs
intended to be portable.
@ -147,6 +149,17 @@ argument was introduced in Linux 1.3.2.
.SH NOTES
The partition or path must be prepared with
.BR mkswap (8).
There is an upper limit on the number of swap files that may be used,
defined by the kernel constant MAX_FILES.
Before kernel 2.6.10, MAX_SWAPFILES has the value 8;
since kernel 2.6.10, it has the value 32.
Since kernel 2.6.18, the limit is decreased by 2 (thus: 30)
if the kernel is built with the CONFIG_MIGRATION option
(which reserves two swap table entries for the page migration features of
.BR mbind (2)
and
.BR migrate_pages (2)).
.SH "SEE ALSO"
.BR mkswap (8),
.BR swapoff (8),