From b61b607514cd3077fa031acc61c981c8c375a244 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Wed, 17 May 2017 15:01:05 -0700 Subject: [PATCH] sanders: Tune zram performance * Set page-cluster to 0 as the incremental cost of reading 1 page at a time is negligible for zram Change-Id: Ia73d08904551dfc8d57268fc4da3f9f34d10e277 Signed-off-by: Davide Garberi Signed-off-by: ronaxdevil --- rootdir/etc/init.qcom.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 2762fc8..8be2e2b 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -41,6 +41,10 @@ on early-init chown root system /dev/kmsg chmod 0620 /dev/kmsg + # ZRAM setup + write /sys/block/zram0/comp_algorithm lz4 + write /proc/sys/vm/page-cluster 0 + on fs wait /dev/block/platform/soc/${ro.boot.bootdevice} symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice