summaryrefslogtreecommitdiffstats
path: root/Documentation/vm/zswap.rst
Commit message (Collapse)AuthorAgeFilesLines
* zswap: docs/vm: Fix typo accept_threshold_percent in zswap.rstSedat Dilek2020-06-011-2/+2
| | | | | | | | | | | | | | | Recently, I switched over from swap-file to zramswap. When reading the Documentation/vm/zswap.rst file I fell over this typo. The parameter is called accept_threshold_percent not accept_threhsold_percent in /sys/module/zswap/parameters/ directory. Fixes: 45190f01dd402 ("mm/zswap.c: add allocation hysteresis if pool limit is hit") Cc: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Link: https://lore.kernel.org/r/20200601005911.31222-1-sedat.dilek@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* mm/zswap: allow setting default status, compressor and allocator in KconfigMaciej S. Szmigiero2020-04-071-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compressed cache for swap pages (zswap) currently needs from 1 to 3 extra kernel command line parameters in order to make it work: it has to be enabled by adding a "zswap.enabled=1" command line parameter and if one wants a different compressor or pool allocator than the default lzo / zbud combination then these choices also need to be specified on the kernel command line in additional parameters. Using a different compressor and allocator for zswap is actually pretty common as guides often recommend using the lz4 / z3fold pair instead of the default one. In such case it is also necessary to remember to enable the appropriate compression algorithm and pool allocator in the kernel config manually. Let's avoid the need for adding these kernel command line parameters and automatically pull in the dependencies for the selected compressor algorithm and pool allocator by adding an appropriate default switches to Kconfig. The default values for these options match what the code was using previously as its defaults. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Vitaly Wool <vitaly.wool@konsulko.com> Link: http://lkml.kernel.org/r/20200202000112.456103-1-mail@maciej.szmigiero.name Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm/zswap.c: add allocation hysteresis if pool limit is hitVitaly Wool2020-01-311-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | zswap will always try to shrink pool when zswap is full. If there is a high pressure on zswap it will result in flipping pages in and out zswap pool without any real benefit, and the overall system performance will drop. The previous discussion on this subject [1] ended up with a suggestion to implement a sort of hysteresis to refuse taking pages into zswap pool until it has sufficient space if the limit has been hit. This is my take on this. Hysteresis is controlled with a sysfs-configurable parameter (namely, /sys/kernel/debug/zswap/accept_threhsold_percent). It specifies the threshold at which zswap would start accepting pages again after it became full. Setting this parameter to 100 disables the hysteresis and sets the zswap behavior to pre-hysteresis state. [1] https://lkml.org/lkml/2019/11/8/949 Link: http://lkml.kernel.org/r/20200108200118.15563-1-vitaly.wool@konsulko.com Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com> Cc: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* docs/vm: rename documentation files to .rstMike Rapoport2018-04-161-0/+135
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>