From e09098ee3446a51f78b32096e3754250cefd95b4 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Sun, 20 Feb 2022 21:39:18 -0800 Subject: [PATCH] init: gs101: improve first cma allocation latency for faceauth When the system boot, migrate big mapped movable pages created by Android boot sequence(e.g., zygote) out of cma to improve first cma allocation. The test with cma trace shows cma allocation reduction from 136ms to 25ms. Test: atest com.google.android.camera.pts.SecurePreviewTest with cma trace Bug: 218731671 Signed-off-by: Minchan Kim Change-Id: Iaa2a2f8c0c3256face3ce9cd21fa4acd6fb531ea --- conf/init.gs101.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index 14b494b1..1260df94 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -687,6 +687,9 @@ on property:sys.boot_completed=1 swapon_all /vendor/etc/fstab.${ro.board.platform} write /proc/sys/vm/swappiness 100 + # Force empty CMA + write /sys/kernel/vendor_mm/cma/farawimg/force_empty 1 + # Back to default VM settings write /proc/sys/vm/dirty_expire_centisecs 3000 write /proc/sys/vm/dirty_background_ratio 10