diff options
| author | Hugh Dickins <[email protected]> | 2009-01-06 14:39:51 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-01-06 15:59:05 -0800 |
| commit | 6a6ba83175c029c7820765bae44692266b29e67a (patch) | |
| tree | 30bfb4938c73b715eb90dd15c09777fe0bbf93e6 /include/linux/debugobjects.h | |
| parent | ebebbbe904634b0ca1c674457b399f68db5e05b1 (diff) | |
swapfile: swapon use discard (trim)
When adding swap, all the old data on swap can be forgotten: sys_swapon()
discard all but the header page of the swap partition (or every extent but
the header of the swap file), to give a solidstate swap device the
opportunity to optimize its wear-levelling.
If that succeeds, note SWP_DISCARDABLE for later use, and report it with a
"D" at the right end of the kernel's "Adding ... swap" message. Perhaps
something should be shown in /proc/swaps (swapon -s), but we have to be
more cautious before making any addition to that format.
Signed-off-by: Hugh Dickins <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Joern Engel <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Donjun Shin <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions