aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrividya Desireddy <srividya.dr@samsung.com>2017-12-14 18:32:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-14 19:00:48 -0500
commit51f73fffbf30b335d036ab356b67b05e16e26585 (patch)
tree575b446ca42261f0c70278640cf58ff4bb15c136
parent3756f6401c302617c5e091081ca4d26ab604bec5 (diff)
Documentation/vm/zswap.txt: update with same-value filled page feature
Update zswap document with details on same-value filled pages identification feature. The usage of zswap.same_filled_pages_enabled module parameter is explained. Link: http://lkml.kernel.org/r/20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6 Signed-off-by: Srividya Desireddy <srividya.dr@samsung.com> Acked-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/vm/zswap.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/Documentation/vm/zswap.txt b/Documentation/vm/zswap.txt
index 89fff7d611cc..0b3a1148f9f0 100644
--- a/Documentation/vm/zswap.txt
+++ b/Documentation/vm/zswap.txt
@@ -98,5 +98,25 @@ request is made for a page in an old zpool, it is uncompressed using its
98original compressor. Once all pages are removed from an old zpool, the zpool 98original compressor. Once all pages are removed from an old zpool, the zpool
99and its compressor are freed. 99and its compressor are freed.
100 100
101Some of the pages in zswap are same-value filled pages (i.e. contents of the
102page have same value or repetitive pattern). These pages include zero-filled
103pages and they are handled differently. During store operation, a page is
104checked if it is a same-value filled page before compressing it. If true, the
105compressed length of the page is set to zero and the pattern or same-filled
106value is stored.
107
108Same-value filled pages identification feature is enabled by default and can be
109disabled at boot time by setting the "same_filled_pages_enabled" attribute to 0,
110e.g. zswap.same_filled_pages_enabled=0. It can also be enabled and disabled at
111runtime using the sysfs "same_filled_pages_enabled" attribute, e.g.
112
113echo 1 > /sys/module/zswap/parameters/same_filled_pages_enabled
114
115When zswap same-filled page identification is disabled at runtime, it will stop
116checking for the same-value filled pages during store operation. However, the
117existing pages which are marked as same-value filled pages remain stored
118unchanged in zswap until they are either loaded or invalidated.
119
101A debugfs interface is provided for various statistic about pool size, number 120A debugfs interface is provided for various statistic about pool size, number
102of pages stored, and various counters for the reasons pages are rejected. 121of pages stored, same-value filled pages and various counters for the reasons
122pages are rejected.