lmkd: fix log message reporting the breached watermark am: 236781873f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9e7f62d919466d83d5c3bf085f0b70b6c690cec5
This commit is contained in:
commit
e452c6be98
6
lmkd.cpp
6
lmkd.cpp
|
|
@ -2508,7 +2508,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
/* Both free memory and swap are low */
|
/* Both free memory and swap are low */
|
||||||
kill_reason = LOW_MEM_AND_SWAP;
|
kill_reason = LOW_MEM_AND_SWAP;
|
||||||
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and swap is low (%"
|
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and swap is low (%"
|
||||||
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_MIN) {
|
if (wmark > WMARK_MIN) {
|
||||||
|
|
@ -2522,13 +2522,13 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
*/
|
*/
|
||||||
kill_reason = LOW_MEM_AND_SWAP_UTIL;
|
kill_reason = LOW_MEM_AND_SWAP_UTIL;
|
||||||
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and swap utilization"
|
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and swap utilization"
|
||||||
" is high (%d%% > %d%%)", wmark > WMARK_LOW ? "min" : "low",
|
" is high (%d%% > %d%%)", wmark < WMARK_LOW ? "min" : "low",
|
||||||
swap_util, swap_util_max);
|
swap_util, swap_util_max);
|
||||||
} else if (wmark < WMARK_HIGH && thrashing > thrashing_limit) {
|
} else if (wmark < WMARK_HIGH && thrashing > thrashing_limit) {
|
||||||
/* Page cache is thrashing while memory is low */
|
/* Page cache is thrashing while memory is low */
|
||||||
kill_reason = LOW_MEM_AND_THRASHING;
|
kill_reason = LOW_MEM_AND_THRASHING;
|
||||||
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and thrashing (%"
|
snprintf(kill_desc, sizeof(kill_desc), "%s watermark is breached and thrashing (%"
|
||||||
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 + 1;
|
min_score_adj = PERCEPTIBLE_APP_ADJ + 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue