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

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

Preserve the LRU positions of its processes when an app is resumed.

When a multiprocess app is sent to background and brought back, the
relative positions of its processes in the process LRU list was being
scrambled due to the connections being stored in an ArraySet, based on
the object's hash value, which is random. With this CL,
updateLruProcessInternalLSP method is split into two stages
(offerLruProcessInternalLSP and completeLruProcessInternalLSP) having
a priority queue in between that stores and sorts the lrui (lru index)
to preserve the positions of the processes in the LRU list relative to
each other. Otherwise, when there is memory pressure, LMKD (Low Memory
Killer Daemon) was killing these processes in an undesired order.

Bug: 359930209
Change-Id: Ia6270dc779dcf959a7c58c836c28a0155dee5215
Test: atest CtsAppTestCases:ServiceTest#testActivityServiceBindingLru
Flag: EXEMPT bugfix
parent 3b0072a7
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