gs201: tweak memory management

- set lmkd's swap_free_low_percentage to 100
- decrease swappiness to 60

This tweak also aligns the policy with P23.

Test: boots with correct settings
Bug: 299975853
Change-Id: I623a7687ef692f8f7a5cc906e186edde294b30be
Signed-off-by: Martin Liu <liumartin@google.com>
This commit is contained in:
Martin Liu 2023-09-12 15:49:21 +08:00 committed by Minchan Kim
parent c7b6ab33ef
commit f7a71debb7
2 changed files with 5 additions and 1 deletions

View file

@ -701,7 +701,7 @@ on property:sys.boot_completed=1
# Enable ZRAM on boot_complete # Enable ZRAM on boot_complete
swapon_all /vendor/etc/fstab.${ro.board.platform} swapon_all /vendor/etc/fstab.${ro.board.platform}
write /proc/sys/vm/swappiness 100 write /proc/sys/vm/swappiness 60
# Adjust watermark level # Adjust watermark level
write /proc/sys/vm/watermark_scale_factor 200 write /proc/sys/vm/watermark_scale_factor 200

View file

@ -1162,6 +1162,10 @@ PRODUCT_COPY_FILES += \
# Call deleteAllKeys if vold detects a factory reset # Call deleteAllKeys if vold detects a factory reset
PRODUCT_VENDOR_PROPERTIES += ro.crypto.metadata_init_delete_all_keys.enabled?=true PRODUCT_VENDOR_PROPERTIES += ro.crypto.metadata_init_delete_all_keys.enabled?=true
# Increase lmkd aggressiveness
PRODUCT_PROPERTY_OVERRIDES += \
ro.lmk.swap_free_low_percentage=100
# Hardware Info # Hardware Info
include hardware/google/pixel/HardwareInfo/HardwareInfo.mk include hardware/google/pixel/HardwareInfo/HardwareInfo.mk