kitakami-common: Enable ZRAM with LZ4 compression

Change-Id: Id4d231eed61dbfcfee160393812a417063035f7e
This commit is contained in:
Artem Borisov 2018-10-27 22:34:04 +03:00 committed by TARKZiM
parent 5c6cf69f87
commit 5490bf5beb
2 changed files with 9 additions and 7 deletions

View File

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

View File

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