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
This commit is contained in:
Pawan Wagh
2024-05-09 23:35:03 +00:00
parent 0f9fe30938
commit 213da03c2b

View File

@@ -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