lmkd : Fixed running wrong for Go devices when use_minfree_levels is TRUE

The lmkd run wrong for Go devices, because min_score_adj is unused
when use_minfree_levels is set TURE.

Bug: 237947900
Signed-off-by: Yuming Han <yuming.han@unisoc.com>
Change-Id: I717561cd9e5f4d1a2ca60d9fc84adcd6e129420a
This commit is contained in:
Yuming Han 2022-07-04 14:02:09 +08:00 committed by Suren Baghdasaryan
parent 508e73e105
commit ed8fc168e6
1 changed files with 2 additions and 1 deletions

View File

@ -3069,7 +3069,8 @@ static void mp_event_common(int data, uint32_t events, struct polling_params *po
do_kill:
if (low_ram_device) {
/* For Go devices kill only one task */
if (find_and_kill_process(level_oomadj[level], NULL, &mi, &wi, &curr_tm, NULL) == 0) {
if (find_and_kill_process(use_minfree_levels ? min_score_adj : level_oomadj[level],
NULL, &mi, &wi, &curr_tm, NULL) == 0) {
if (debug_process_killing) {
ALOGI("Nothing to kill");
}