lmkd: Send Actual OOM Score to lmkd_free_memory_before_kill_hook
Previously the min_oom score of the candidate search was sent to lmkd_free_memory_before_kill_hook. This is incorrect as the hook expects the actual oom score of the process. Bug: b/273670531 Test: cq Change-Id: Id72c8b39f9c745a8f20fde15266857cb2d2222bf
This commit is contained in:
parent
bb87e41b6f
commit
556740ef04
2
lmkd.cpp
2
lmkd.cpp
|
|
@ -2348,7 +2348,7 @@ static int kill_one_process(struct proc* procp, int min_oom_score, struct kill_i
|
|||
snprintf(desc, sizeof(desc), "lmk,%d,%d,%d,%d,%d", pid, ki ? (int)ki->kill_reason : -1,
|
||||
procp->oomadj, min_oom_score, ki ? ki->max_thrashing : -1);
|
||||
|
||||
result = lmkd_free_memory_before_kill_hook(procp, rss_kb / page_k, min_oom_score,
|
||||
result = lmkd_free_memory_before_kill_hook(procp, rss_kb / page_k, procp->oomadj,
|
||||
ki ? (int)ki->kill_reason : -1);
|
||||
if (result > 0) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue