lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498 am: b0027daa8a

Change-Id: If41581e301554ecf24b97a89bb174303326a5c99
This commit is contained in:
Suren Baghdasaryan 2020-05-20 19:16:25 +00:00 committed by Automerger Merge Worker
commit 7f2ddf5ff0
1 changed files with 2 additions and 3 deletions

View File

@ -129,8 +129,7 @@
* System property defaults * System property defaults
*/ */
/* ro.lmk.swap_free_low_percentage property defaults */ /* ro.lmk.swap_free_low_percentage property defaults */
#define DEF_LOW_SWAP_LOWRAM 10 #define DEF_LOW_SWAP 10
#define DEF_LOW_SWAP 20
/* ro.lmk.thrashing_limit property defaults */ /* ro.lmk.thrashing_limit property defaults */
#define DEF_THRASHING_LOWRAM 30 #define DEF_THRASHING_LOWRAM 30
#define DEF_THRASHING 100 #define DEF_THRASHING 100
@ -3215,7 +3214,7 @@ static void update_props() {
per_app_memcg = per_app_memcg =
property_get_bool("ro.config.per_app_memcg", low_ram_device); property_get_bool("ro.config.per_app_memcg", low_ram_device);
swap_free_low_percentage = clamp(0, 100, property_get_int32("ro.lmk.swap_free_low_percentage", swap_free_low_percentage = clamp(0, 100, property_get_int32("ro.lmk.swap_free_low_percentage",
low_ram_device ? DEF_LOW_SWAP_LOWRAM : DEF_LOW_SWAP)); DEF_LOW_SWAP));
psi_partial_stall_ms = property_get_int32("ro.lmk.psi_partial_stall_ms", psi_partial_stall_ms = property_get_int32("ro.lmk.psi_partial_stall_ms",
low_ram_device ? DEF_PARTIAL_STALL_LOWRAM : DEF_PARTIAL_STALL); low_ram_device ? DEF_PARTIAL_STALL_LOWRAM : DEF_PARTIAL_STALL);
psi_complete_stall_ms = property_get_int32("ro.lmk.psi_complete_stall_ms", psi_complete_stall_ms = property_get_int32("ro.lmk.psi_complete_stall_ms",