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
Loading
Please register or sign in to comment