From 9ef3e4e4de0e8375c22c27ff980e1e308d451968 Mon Sep 17 00:00:00 2001 From: Pranav Vashi Date: Sat, 6 May 2023 21:32:20 +0530 Subject: [PATCH] Spacewar: rootdir: Always use lz4 for zram Change-Id: I8b462afd2f209df8236f2a3c862cb1109385a818 Signed-off-by: Pranav Vashi Signed-off-by: Guidix --- rootdir/bin/init.kernel.post_boot.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/rootdir/bin/init.kernel.post_boot.sh b/rootdir/bin/init.kernel.post_boot.sh index 4b6da92..7fa76a1 100644 --- a/rootdir/bin/init.kernel.post_boot.sh +++ b/rootdir/bin/init.kernel.post_boot.sh @@ -34,12 +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. - let RamSizeGB="( $MemTotal / 1048576 ) + 1" diskSizeUnit=M if [ $RamSizeGB -le 2 ]; then @@ -53,9 +47,8 @@ function configure_zram_parameters() { let zRamSizeMB=4096 fi - if [ "$low_ram" == "true" ]; then - echo lz4 > /sys/block/zram0/comp_algorithm - fi + # And enable lz4 zram compression + echo lz4 > /sys/block/zram0/comp_algorithm if [ -f /sys/block/zram0/disksize ]; then if [ -f /sys/block/zram0/use_dedup ]; then