From b41622fbace39aa2485b0689a0c0087601152564 Mon Sep 17 00:00:00 2001 From: Volodymyr Zhdanov Date: Wed, 9 Sep 2020 12:52:37 +0300 Subject: [PATCH] davinci: rootdir: Don't configure zram in init.qcom.post_boot.sh * let it use the size which is set in fstab Change-Id: Ie84d0674a643e637d5ef894399d76ede25d00eeb --- rootdir/bin/init.qcom.post_boot.sh | 14 -------------- rootdir/etc/init.target.rc | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh index d17eec7..f91fe26 100644 --- a/rootdir/bin/init.qcom.post_boot.sh +++ b/rootdir/bin/init.qcom.post_boot.sh @@ -29,13 +29,6 @@ target=`getprop ro.board.platform` -function configure_zram_parameters() { - # Set Zram disk size=1GB for >=2GB Non-Go targets. - echo 2684350464 > /sys/block/zram0/disksize - mkswap /dev/block/zram0 - swapon /dev/block/zram0 -p 32758 -} - function configure_memory_parameters() { # Set Memory parameters. # @@ -81,13 +74,6 @@ function configure_memory_parameters() { # use Google default LMK series for all 64-bit targets >=2GB. echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper - - # Set allocstall_threshold to 0 - # Set swappiness to 100 - echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold - echo 100 > /proc/sys/vm/swappiness - - configure_zram_parameters } case "$target" in diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index c7a6caa..e270cde 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -135,6 +135,14 @@ on property:sys.boot_completed=1 write /sys/module/cpu_boost/parameters/input_boost_freq "0:1324800" write /sys/module/cpu_boost/parameters/input_boost_ms 120 + # Set allocstall_threshold to 0 + # Set swappiness to 100 + write /sys/module/vmpressure/parameters/allocstall_threshold 0 + write /proc/sys/vm/swappiness 100 + + # Enable ZRAM on boot_complete + swapon_all /vendor/etc/fstab.qcom + service vendor.pd_mapper /vendor/bin/pd-mapper class core user system