redwood: rootdir: switch to lz4kd for zram

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
This commit is contained in:
Chenyang Zhong
2022-06-19 00:33:22 -04:00
committed by thepriyanshujangid
parent 6aca4bf782
commit 32c9ac8cc2

View File

@@ -34,8 +34,6 @@ function configure_zram_parameters() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
low_ram=`getprop ro.config.low_ram`
# Zram disk - 75% for Go and < 2GB devices .
# For >2GB Non-Go devices, size = 50% of RAM size. Limit the size to 4GB.
# And enable lz4 zram compression for Go targets.
@@ -53,9 +51,7 @@ function configure_zram_parameters() {
let zRamSizeMB=4096
fi
if [ "$low_ram" == "true" ]; then
echo lz4 > /sys/block/zram0/comp_algorithm
fi
echo lz4kd > /sys/block/zram0/comp_algorithm
if [ -f /sys/block/zram0/disksize ]; then
if [ -f /sys/block/zram0/use_dedup ]; then