adjust applying watermark_scale_factor timing

We should apply watermark_sclae_factor after
boot complete. Otherwise, extra_free_kbytes.sh
might overwrite it and this also aligns with
previous projects' timing.

Bug: 278075546
Test: boot and check watermark_scale_factor
Change-Id: I7989fd1e8cd968193577300b0f83a829bdeb037d
Signed-off-by: Martin Liu <liumartin@google.com>
This commit is contained in:
Martin Liu 2023-05-02 17:18:12 +08:00
parent db23f42402
commit 72637ea363

View file

@ -105,9 +105,6 @@ on init
write /sys/block/zram0/comp_algorithm lz77eh
write /proc/sys/vm/page-cluster 0
# Adjust watermark level
write /proc/sys/vm/watermark_scale_factor 200
# Some user code relies on ro.boot.hardware.revision
setprop ro.boot.hardware.revision ${ro.revision}
@ -718,6 +715,9 @@ on property:sys.boot_completed=1
swapon_all /vendor/etc/fstab.${ro.board.platform}
write /proc/sys/vm/swappiness 100
# Adjust watermark level
write /proc/sys/vm/watermark_scale_factor 200
# Back to default VM settings
write /proc/sys/vm/dirty_expire_centisecs 3000
write /proc/sys/vm/dirty_background_ratio 10