From 213da03c2b0c7331cab0d33b9fa5be87222d1575 Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Thu, 9 May 2024 23:35:03 +0000 Subject: [PATCH] Use lzo-rle for 16kb page kernel Test: Checked zram compression with 4KB and 16KB kernel ======== Using 4KB kernel================ $ adb shell getconf PAGE_SIZE 4096 $ adb shell cat /sys/block/zram0/comp_algorithm [lz77eh] zstd deflate lz4 lzo-rle lzo ======== Using 16KB kernel================ $ adb root restarting adbd as root $ adb shell cat /sys/block/zram0/comp_algorithm lz77eh zstd deflate lz4 [lzo-rle] lzo $ adb shell getconf PAGE_SIZE 16384 Bug: 316158358 Change-Id: I068cf4f9ab9a1fdc36f141a1de6f4ea293db9d6f --- conf/init.zuma.rc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index c1288a0c..f98001b3 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -102,7 +102,6 @@ on init start vendor.keymaster-4-0 # ZRAM setup - write /sys/block/zram0/comp_algorithm lz77eh write /proc/sys/vm/page-cluster 0 # Some user code relies on ro.boot.hardware.revision @@ -361,6 +360,12 @@ on init chown root system /sys/devices/platform/16490000.gsa-ns/log_main chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate +on init && property:ro.boot.hardware.cpu.pagesize=4096 + write /sys/block/zram0/comp_algorithm lz77eh + +on init && property:ro.boot.hardware.cpu.pagesize=16384 + write /sys/block/zram0/comp_algorithm lzo-rle + on post-fs # Ensure device is ready and start storageproxyd wait /dev/sg1