diff options
author | Jaegeuk Kim <jaegeuk@google.com> | 2019-04-02 07:01:43 -0700 |
---|---|---|
committer | Wang Han <416810799@qq.com> | 2020-06-13 19:59:38 +0800 |
commit | 87e43cb7009897314c5a33370da66bf337327576 (patch) | |
tree | 735e718758eef9f98da76e4f186f16174f7ff3f6 /rootdir | |
parent | 350500d60d8808867e531c1769b179f3db423d87 (diff) | |
download | system_core-87e43cb7009897314c5a33370da66bf337327576.tar.gz system_core-87e43cb7009897314c5a33370da66bf337327576.tar.bz2 system_core-87e43cb7009897314c5a33370da66bf337327576.zip |
rootdir: init.rc: use default dirty writeout policy
This patch removed the old writeout policy tune which was never touched since
2009. In the meantime, most of Android devices are equipped with over 4GB DRAM
and very fast flash storages like UFS, which becomes more like desktop or
servers in 2009. So, it'd be worth to go back to use the default kernel configs.
Bug: 129751503
Change-Id: Idb58f5b01bbc4afd270cffba5b8912ea3565819f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.rc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index 2925725df..5cf9054c9 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -656,6 +656,11 @@ on zygote-start && property:ro.crypto.state=encrypted && property:ro.crypto.type start zygote start zygote_secondary +on boot && property:ro.config.low_ram=true + # Tweak background writeout + write /proc/sys/vm/dirty_expire_centisecs 200 + write /proc/sys/vm/dirty_background_ratio 5 + on boot # basic network init ifup lo @@ -681,11 +686,7 @@ on boot chown root system /sys/block/zram0/writeback chmod 0664 /sys/block/zram0/writeback - # Tweak background writeout - write /proc/sys/vm/dirty_expire_centisecs 200 - write /proc/sys/vm/dirty_background_ratio 5 - - # F2FS tuning. Set cp_interval larger than dirty_expire_centisecs + # F2FS tuning. Set cp_interval larger than dirty_expire_centisecs, 30 secs, # to avoid power consumption when system becomes mostly idle. Be careful # to make it too large, since it may bring userdata loss, if they # are not aware of using fsync()/sync() to prepare sudden power-cut. |