Spacewar: rootdir: Always use lz4 for zram
Change-Id: I8b462afd2f209df8236f2a3c862cb1109385a818 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: Guidix <guidixm@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user