diff mbox series

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

Message ID 20240223035548.2591882-5-wangkefeng.wang@huawei.com (mailing list archive)
State New
Headers show
Series mm: unify default compressor algorithm for zram/zswap | expand

Commit Message

Kefeng Wang Feb. 23, 2024, 3:55 a.m. UTC
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@huawei.com>
---
 mm/Kconfig | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff mbox series

Patch

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