Re: discard change to swapon(2) and swapon(8)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 4 Nov 2010, Michael Kerrisk wrote:
> 
> Hugh, would you write a patch for the man-page? Or just supply me with
> the raw text that should be added to the man page?

Here we go, Michael.  Sorry to be so lame, but I'm not used to patching
man pages, so I'll probably waste less of your time if I just supply the
raw text, and let you do the italicizing and emboldening etc - thanks.

Karel, I now see swapon.8 comes with util-linux-ng: text for that below;
and please let me know who I should contact, to get SWAP_FLAG_DISCARD in
/usr/include/sys/swap.h, unless you already have that in hand - thanks.

I don't see anywhere to document the "discard" swap option in fstab.5.


For man-pages/man2/swapon.2:

A paragraph in DESCRIPTION, after section on SWAP_FLAG_PREFER and priority:

If swapflags has the SWAP_FLAG_DISCARD bit turned on, freed swap pages will
be discarded before they are reused, if the swap device supports the discard
or trim operation.  This may improve performance on some Solid State Devices,
but often it does not.

A paragraph at the end of NOTES:

Discard of swap pages was introduced in kernel 2.6.29, then made conditional
on the SWAP_FLAG_DISCARD bit in kernel 2.6.35.5: which still discards the
entire swap area when swapon is called, even if that flag bit is not set.


For util-linux-ng/mount/swapon.8:

In SYNOPSIS, add -d to the Enable/disable line:

            swapon [-d] [-f] [-p priority] [-v] specialfile [specialfile ...]

In DESCRIPTION, after description of -a, --all:

       -d, --discard
              Discard freed swap pages before they are reused, if the swap
              device supports the discard or trim operation.  This may improve
              performance on some Solid State Devices, but often it does not.

Hugh
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux