lmkd: Fix do not kill perceptible apps due to low swap if above min wmark am: 3185c2d096 am: ff6ad5cd06 am: 3a2aeaba0e
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1321895 Change-Id: I7349628a326f0f8e6672462e604c0bf3e81c496c
This commit is contained in:
commit
6f4f82ffef
4
lmkd.cpp
4
lmkd.cpp
|
|
@ -2397,7 +2397,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
"kB < %" PRId64 "kB) and thrashing (%" PRId64 "%%)",
|
"kB < %" PRId64 "kB) and thrashing (%" PRId64 "%%)",
|
||||||
mi.field.free_swap * page_k, swap_low_threshold * page_k, thrashing);
|
mi.field.free_swap * page_k, swap_low_threshold * page_k, thrashing);
|
||||||
/* Do not kill perceptible apps unless below min watermark */
|
/* Do not kill perceptible apps unless below min watermark */
|
||||||
if (wmark < WMARK_LOW) {
|
if (wmark > WMARK_MIN) {
|
||||||
min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
|
min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
|
||||||
}
|
}
|
||||||
} else if (swap_is_low && wmark < WMARK_HIGH) {
|
} else if (swap_is_low && wmark < WMARK_HIGH) {
|
||||||
|
|
@ -2407,7 +2407,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
PRId64 "kB < %" PRId64 "kB)", wmark > WMARK_LOW ? "min" : "low",
|
PRId64 "kB < %" PRId64 "kB)", wmark > WMARK_LOW ? "min" : "low",
|
||||||
mi.field.free_swap * page_k, swap_low_threshold * page_k);
|
mi.field.free_swap * page_k, swap_low_threshold * page_k);
|
||||||
/* Do not kill perceptible apps unless below min watermark */
|
/* Do not kill perceptible apps unless below min watermark */
|
||||||
if (wmark < WMARK_LOW) {
|
if (wmark > WMARK_MIN) {
|
||||||
min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
|
min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
|
||||||
}
|
}
|
||||||
} else if (wmark < WMARK_HIGH && swap_util_max < 100 &&
|
} else if (wmark < WMARK_HIGH && swap_util_max < 100 &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue