summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapon.8
diff options
context:
space:
mode:
authorRichard Yao2016-03-11 23:03:27 +0100
committerKarel Zak2016-03-14 12:26:28 +0100
commit1d01d13edaa0ee52ac5a6da5a0822377b43483da (patch)
tree471cd7d5bb4a65cf15c8ab874bdba72d8603f899 /sys-utils/swapon.8
parentbuild-sys: release++ (v2.28-rc1) (diff)
downloadkernel-qcow2-util-linux-1d01d13edaa0ee52ac5a6da5a0822377b43483da.tar.gz
kernel-qcow2-util-linux-1d01d13edaa0ee52ac5a6da5a0822377b43483da.tar.xz
kernel-qcow2-util-linux-1d01d13edaa0ee52ac5a6da5a0822377b43483da.zip
swapon: fix discard=pages docs
The documentation for discard=pages is ambiguous in that it could be interpreted to mean either that the pages are discarded immediately after being freed or that the pages are discarded immediately before being reused by a write. Both implementations would satisfy the statement "discard freed swap pages before they are avaliable for reuse", but the kernel does the former. Doing a discard operation (which is non-queued on SATA drives before SATA 3.1) before a write operation to the same sector is pointless unless using, pre-SATA 3.1 drives, where discard is detrimental because ATA TRIM is a non-queued command. Anyone who wants discard operations on swap and interprets the man page as describing the incorrect behavior would opt for discard=once over discard, when discard provides the behavior of both discard=once and discard=pages, which is what they likely want. Lets make a small change to the documentation to clarify the behavior. Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'sys-utils/swapon.8')
-rw-r--r--sys-utils/swapon.82
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/swapon.8 b/sys-utils/swapon.8
index 299da2282..9abb1b39f 100644
--- a/sys-utils/swapon.8
+++ b/sys-utils/swapon.8
@@ -87,7 +87,7 @@ available swap discard policies:
to perform a single-time discard operation for the whole swap area at swapon;
or
.BI \-\-discard=pages
-to discard freed swap pages before they are reused, while swapping.
+to asynchronously discard freed swap pages before they are avaliable for reuse.
If no policy is selected, the default behavior is to enable both discard types.
The
.I /etc/fstab