diff options
author | Edgar Arriaga <edgararriaga@google.com> | 2021-12-15 18:14:28 -0800 |
---|---|---|
committer | Divyanand Rangu <quic_drangu@quicinc.com> | 2022-03-10 17:12:43 +0530 |
commit | a79fb136f6dc73353af443af59d2ca4b8ade0365 (patch) | |
tree | c7b0334f01cb12124b6f9021e8d8a8b4e2910970 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | a42412b7fc93a0eb852d8bf1a4d001f7df7f43b3 (diff) |
Cancel compaction if the process improves its OOM ranking while compaction is running
There is a significant delay between the time we issue a compaction and when its done
during this time the OOM adjust sometimes changes, however, the current compaction
still keeps running, which leads to situations where proc A starts running
while compaction for proc A is happening leading to long delays as compaction
grabs the mmap_lock thus not allowing for allocations to happen during that time
So the aim of this CL is to reduce the likelihood of such situations by avoiding
continuing compaction when we detect such OOM adjust improvement outside of cache state.
Note that we do not kill the currently running process_madvise, instead we avoid
issuing new process_madvise calls so this will likely improve situations where an app has
many VMAs.
Test: Manual. Checked that JNI callback happens and that OOM adjusts match
as well as checked that compaction is cancelled when the improvement in OOM happens.
Bug: 208966958
CRs-Fixed:3121545
Change-Id: I202a96d884e2a0dc7ac7013eca91a36cd58acc80
(cherry picked from commit 57da948b1988990dbfb78a8b5f1ec64aa712aebb)
Change-Id: Ia467603e4e02a7e564b6f955b23d074d1676879a
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions