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

Skip to content
Commit 326c51d7 authored by Tim Murray's avatar Tim Murray
Browse files

OomAdjuster: use oom_adj_score tiers for cached apps

Metrics suggest that cached apps do not get promoted out of cached in
anything resembling LRU ordering. Maintaining the LRU order is
expensive for both ActivityManager and LMKD. Instead of a strict LRU,
use tiers of oom_adj_scores for cached apps:

- 900 for cached apps bound with BIND_WAIVE_PRIORITY or similar
- 910 for freezer-eligible apps that entered cached in the last 60s
- 950 for freezer-eligible apps that entered cached more than 60s ago

Tiered oom_adj_scores for cached apps can be enabled with the
"use_tiered_cached_adj" DeviceConfig flag, and the decay time (in ms)
can be modified with the "tiered_cached_adj_decay_time" DeviceConfig
flag.

oom_adj_score tiers currently default to off.

Bug: 253908413
Test: atest MockingOomAdjusterTests

Change-Id: Ie386672c321227eb689902863df0b0022fa09e49
Merged-in: Ie386672c321227eb689902863df0b0022fa09e49
parent e2219799
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment