From b2537330bcd883c0c1a61524f36c7c4a4b7e6d2d Mon Sep 17 00:00:00 2001 From: tunturn Date: Mon, 6 Mar 2017 22:56:46 +1100 Subject: shinano-common: enable ZRAM Change-Id: I178efeca573134df78e1227f3db89cfb8ce2779d --- rootdir/fstab.qcom | 2 ++ rootdir/init.qcom.rc | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'rootdir') diff --git a/rootdir/fstab.qcom b/rootdir/fstab.qcom index 8bdd8a8..e7d21fd 100644 --- a/rootdir/fstab.qcom +++ b/rootdir/fstab.qcom @@ -15,3 +15,5 @@ /devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata /devices/msm_sdcc.3/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata /devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto +/dev/block/zram0 none swap defaults zramsize=533413200,zramstreams=4,notrim + diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index 6be57e2..a9e2002 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -64,6 +64,9 @@ on init # Enable panic on out of memory write /proc/sys/vm/panic_on_oom 2 + # Setup zram options + write /sys/block/zram0/comp_algorithm lz4 + # Create a tmpfs for dynamic network mounting mkdir /storage/removable/remote 0700 root system mount tmpfs tmpfs /storage/removable/remote mode=0755,uid=0,gid=0 @@ -81,6 +84,9 @@ on fs chown system system /lta-label chmod 0555 /lta-label + # Mount ZRAM + swapon_all fstab.qcom + on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 -- cgit v1.2.3