diff options
author | Martin Liu <liumartin@google.com> | 2020-06-02 13:05:51 +0800 |
---|---|---|
committer | Martin Liu <liumartin@google.com> | 2020-06-02 23:47:01 +0800 |
commit | dfc73bc2fe5d0fa2fa4a8caa9522a1419453485b (patch) | |
tree | 717cb0f2e6c61f039055865a0cde22505ad5cde1 | |
parent | 7afa46397875f76fa0eb9576872c7ab3e2895844 (diff) | |
download | lmkd-dfc73bc2fe5d0fa2fa4a8caa9522a1419453485b.tar.gz |
lmkd: Fix do not kill perceptible apps due to low swap if above min wmarkandroid11-dev
Fix code logic to obey our intetion of not killing perceptible apps
due to low swap if above min wmark.
Bug: 155709603
Test: boot
Signed-off-by: Martin Liu <liumartin@google.com>
Merged-In: Ifc09c2a1fe7e21faa096988f471644f63951d81c
Change-Id: Ifc09c2a1fe7e21faa096988f471644f63951d81c
-rw-r--r-- | lmkd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2387,7 +2387,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_ "kB < %" PRId64 "kB) and thrashing (%" PRId64 "%%)", mi.field.free_swap * page_k, swap_low_threshold * page_k, thrashing); /* Do not kill perceptible apps unless below min watermark */ - if (wmark < WMARK_LOW) { + if (wmark > WMARK_MIN) { min_score_adj = PERCEPTIBLE_APP_ADJ + 1; } } else if (swap_is_low && wmark < WMARK_HIGH) { @@ -2397,7 +2397,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_ PRId64 "kB < %" PRId64 "kB)", wmark > WMARK_LOW ? "min" : "low", mi.field.free_swap * page_k, swap_low_threshold * page_k); /* Do not kill perceptible apps unless below min watermark */ - if (wmark < WMARK_LOW) { + if (wmark > WMARK_MIN) { min_score_adj = PERCEPTIBLE_APP_ADJ + 1; } } else if (wmark < WMARK_HIGH && thrashing > thrashing_limit) { |