From c1171394a3559d4fba8aca1fbd037eec03212ca0 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Tue, 20 Jul 2021 10:52:00 -0700 Subject: [PATCH] lmkd: Disable critical thrashing limit by default Critical thrashing limit determines the balance between how much thrashing should be tolerated before killing a perceptible app. This threshold might differ between devices, therefore we disable critical thrashing limit by default allowing each device to set it individually. This is done to prevent excessive kills of perceptible apps. Bug: 194199500 Signed-off-by: Suren Baghdasaryan Change-Id: Idd1715564c3727b09fcb0a109ab3d6bae9d0b99a --- lmkd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmkd.cpp b/lmkd.cpp index f3c301e..04e19fa 100644 --- a/lmkd.cpp +++ b/lmkd.cpp @@ -3429,7 +3429,7 @@ static void update_props() { thrashing_limit_decay_pct = clamp(0, 100, property_get_int32("ro.lmk.thrashing_limit_decay", low_ram_device ? DEF_THRASHING_DECAY_LOWRAM : DEF_THRASHING_DECAY)); thrashing_critical_pct = max(0, property_get_int32("ro.lmk.thrashing_limit_critical", - thrashing_limit_pct * 2)); + INT_MAX)); swap_util_max = clamp(0, 100, property_get_int32("ro.lmk.swap_util_max", 100)); filecache_min_kb = property_get_int64("ro.lmk.filecache_min_kb", 0); }