lmkd: Fix min_score_adj to exclude killing foreground processes am: 5c039b53d8

Change-Id: Iebe3f5c02c882cc47e5fb25cd14bff4ee9667482
This commit is contained in:
Suren Baghdasaryan 2020-05-20 20:59:11 +00:00 committed by Automerger Merge Worker
commit d9ba0c99ae
1 changed files with 2 additions and 2 deletions

View File

@ -2420,7 +2420,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
PRId64 "%%)", wmark > WMARK_LOW ? "min" : "low", thrashing); PRId64 "%%)", wmark > WMARK_LOW ? "min" : "low", thrashing);
cut_thrashing_limit = true; cut_thrashing_limit = true;
/* Do not kill perceptible apps because of thrashing */ /* Do not kill perceptible apps because of thrashing */
min_score_adj = PERCEPTIBLE_APP_ADJ; min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
} else if (reclaim == DIRECT_RECLAIM && thrashing > thrashing_limit) { } else if (reclaim == DIRECT_RECLAIM && thrashing > thrashing_limit) {
/* Page cache is thrashing while in direct reclaim (mostly happens on lowram devices) */ /* Page cache is thrashing while in direct reclaim (mostly happens on lowram devices) */
kill_reason = DIRECT_RECL_AND_THRASHING; kill_reason = DIRECT_RECL_AND_THRASHING;
@ -2428,7 +2428,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
PRId64 "%%)", thrashing); PRId64 "%%)", thrashing);
cut_thrashing_limit = true; cut_thrashing_limit = true;
/* Do not kill perceptible apps because of thrashing */ /* Do not kill perceptible apps because of thrashing */
min_score_adj = PERCEPTIBLE_APP_ADJ; min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
} }
/* Kill a process if necessary */ /* Kill a process if necessary */