[PATCH 4/5] mm: zswap: default to lzo-rle instead of lzo

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

 



Since lzo-rle performance is better than lzo, see commit ce82f19fd580
("zram: default to lzo-rle instead of lzo"), converting zswap to use
lze-rle too.

Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
 mm/Kconfig | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index b1448aa81e15..f41a28b74efd 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -62,7 +62,7 @@ config ZSWAP_SHRINKER_DEFAULT_ON
 choice
 	prompt "Default compressor"
 	depends on ZSWAP
-	default ZSWAP_COMPRESSOR_DEFAULT_LZO
+	default ZSWAP_COMPRESSOR_DEFAULT_LZORLE
 	help
 	  Selects the default compression algorithm for the compressed cache
 	  for swap pages.
@@ -72,7 +72,7 @@ choice
 	  available at the following LWN page:
 	  https://lwn.net/Articles/751795/
 
-	  If in doubt, select 'LZO'.
+	  If in doubt, select 'LZO-RLE'.
 
 	  The selection made here can be overridden by using the kernel
 	  command line 'zswap.compressor=' option.
@@ -83,6 +83,12 @@ config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
 	help
 	  Use the Deflate algorithm as the default compression algorithm.
 
+config ZSWAP_COMPRESSOR_DEFAULT_LZORLE
+	bool "LZO-RLE"
+	select CRYPTO_LZO
+	help
+	  Use the LZO algorithm as the default compression algorithm.
+
 config ZSWAP_COMPRESSOR_DEFAULT_LZO
 	bool "LZO"
 	select CRYPTO_LZO
@@ -118,6 +124,7 @@ config ZSWAP_COMPRESSOR_DEFAULT
        string
        depends on ZSWAP
        default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
+       default "lzo-rle" if ZSWAP_COMPRESSOR_DEFAULT_LZORLE
        default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
        default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
        default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
-- 
2.27.0





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux