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