From 1ef4718aedff5a7992690c107d76eb2f960b45d4 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 22 Jul 2021 20:59:31 +0000 Subject: [PATCH] Revert "lmkd: Disable critical thrashing limit by default" This reverts commit e1ffef4e36bcbdf4cc441137e25e35d851c19f86. Reason for revert: Restore the default thrashing limits to prevent unresponsive devices. Bug: 194199500 Change-Id: I15be5b3d67a71b68bca6dea9c2d5b4aa54d6c260 Merged-In: I15be5b3d67a71b68bca6dea9c2d5b4aa54d6c260 --- lmkd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmkd.cpp b/lmkd.cpp index 04e19fa..f3c301e 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", - INT_MAX)); + thrashing_limit_pct * 2)); 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); }