When system is under heavy memory pressure the system might be able to keep free memory above the min watermark avoiding perceptible app kills. In such situation system might end up using all its cpu capacity on memory reclaim and not doing productive work. To detect this condition, check memory full stall and compare it with the new ro.lmk.stall_limit_critical tunable representing the stall threshold. When the recorded level is over ro.lmk.stall_limit_critical, lmkd will be allowed to kill perceptible apps. ro.lmk.stall_limit_critical represents the max memory full stall in % that is allowed before perceptible apps will get killed. By default it is set to 100%, which effectively disables the feature. Currently system stall is measured based on psi memory stall 10s average value, however this definition might change in the future if better metrics are developed. Setting ro.lmk.stall_limit_critical to 5 means the system should be fully stalled (no productive work is done) for 5% of the 10sec period, resulting in 0.5 sec loss due to the stall. Bug: 205182133 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I9713e30d82641d86d1b7edb5e1ba2971b935c898 |
||
|---|---|---|
| .. | ||
| include/psi | ||
| Android.bp | ||
| OWNERS | ||
| psi.cpp | ||