Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c4ce739e authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Fix prev expire flow in OomAdjuster.

When an app is sent to background, it gets prev oom score with all its
bindings (except the ones bound with the BIND_WAIVE_PRIORITY flag).
Then there are three ways the app loses this prev score.

1. Another app comes top, and then goes background,
   taking away the prev status.
2. After 60 seconds, prev status expires.
3. App comes foreground again. (This one is not relevant to the topic)

Flow 1 and 2 have different results. When 1 happens, all the processes
get chh+X with respect to their position in the process LRU list. But
when 2 happens, the processes with prev score all get cch. And this
causes a random killing order in LMKD.

This CL makes "prev expire" flow similar to "another app grabbing prev"
flow.

Bug: 357844136
Change-Id: I9efa3b3855d8d9ddb29d9b3358cb648d38099204
Test: atest MockingOomAdjusterTests#testUpdateOomAdj_DoAll_PreviousApp
Flag: EXEMPT bugfix
parent cecce414
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment