From 5490bf5bebf3dc4e175aaa6b774dcf4ffca19c99 Mon Sep 17 00:00:00 2001 From: Artem Borisov Date: Sat, 27 Oct 2018 22:34:04 +0300 Subject: [PATCH] kitakami-common: Enable ZRAM with LZ4 compression Change-Id: Id4d231eed61dbfcfee160393812a417063035f7e --- rootdir/fstab.qcom | 2 ++ rootdir/init.qcom.rc | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rootdir/fstab.qcom b/rootdir/fstab.qcom index 3ee43ec..a62943e 100644 --- a/rootdir/fstab.qcom +++ b/rootdir/fstab.qcom @@ -19,3 +19,5 @@ /devices/soc.0/f9200000.ssusb/f9200000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usbdisk:auto +# Zram +/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=8 diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index f6419ac..50e3109 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -63,6 +63,10 @@ on init mkdir /storage/removable/remote 0700 root system mount tmpfs tmpfs /storage/removable/remote mode=0755,uid=0,gid=0 + # ZRAM setup + write /sys/block/zram0/comp_algorithm lz4 + write /proc/sys/vm/page-cluster 0 + on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 @@ -238,13 +242,6 @@ on boot write /sys/module/snd_soc_wcd9xxx/parameters/impedance_detect_en 0 on post-fs - # Setup zram options - write /sys/block/zram0/comp_algorithm lz4 - write /sys/block/zram0/max_comp_streams 4 - - write /proc/sys/vm/page-cluster 0 - - swapon_all fstab.qcom on post-fs-data # Fingerprint data folder @@ -505,6 +502,9 @@ on property:ro.data.large_tcp_window_size=true # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) write /proc/sys/net/ipv4/tcp_adv_win_scale 2 +on property:dev.bootcomplete=1 + swapon_all fstab.qcom + service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf socket msm_irqbalance seqpacket 660 root system class main