Switch ZSWAP_ZPOOL to zsmalloc

The z3fold compressed pages allocator is on it's way
out of the Linux kernel and running this on newer
systems will give you an error:

+ lib/host:configure_zswap:45              :   echo z3fold
z3fold
tee: /sys/module/zswap/parameters/zpool: No such file or directory

So, get ahead of things and move to the much faster
recommended by the kernel developers alternative.

[1]: https://lore.kernel.org/all/20240904233343.933462-1-yosryahmed@google.com/T/#u

Change-Id: I7c137114dd7585d3179a8d5dee818bb379bbcb1f
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
(cherry picked from commit 5cb2abf79e)
(cherry picked from commit 62537e6d3e)
(cherry picked from commit bea1b15527)
This commit is contained in:
Mohammed Naser
2025-02-25 22:54:05 -05:00
committed by Stephen Finucane
parent b04346b263
commit ee3cba60bd

View File

@@ -35,7 +35,7 @@ ENABLE_ZSWAP=$(trueorfalse False ENABLE_ZSWAP)
# lz4 is very fast although it does not have the best compression
# zstd has much better compression but more latency
ZSWAP_COMPRESSOR=${ZSWAP_COMPRESSOR:="lz4"}
ZSWAP_ZPOOL=${ZSWAP_ZPOOL:="z3fold"}
ZSWAP_ZPOOL=${ZSWAP_ZPOOL:="zsmalloc"}
function configure_zswap {
if [[ $ENABLE_ZSWAP == "True" ]] ; then
# Centos 9 stream seems to only support enabling but not run time