Revert "lmkd: change default lowmem_min_oom_score for low-RAM devices" am: ee6412ebf0 am: 61adbf3b67

Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/3147096

Change-Id: I2ea9d2a9b877f966062fe9dee25e7e360f1b7ed0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Suren Baghdasaryan 2024-06-25 22:35:07 +00:00 committed by Automerger Merge Worker
commit cee3c2d01e
2 changed files with 5 additions and 8 deletions

View File

@ -104,9 +104,8 @@ properties:
to kill when memory is critically low. Setting it to kill when memory is critically low. Setting it
to 1001 will prevent any kills for this reason. Min to 1001 will prevent any kills for this reason. Min
acceptable value is 201 (apps up to perceptible). acceptable value is 201 (apps up to perceptible).
Default for low-RAM devices = 1001 (disabled), for Default = 701 (all cached apps excluding the last
high-end devices = 701 (all cached apps excluding active one).
the last active one).
lmkd will set the following Android properties according to current system lmkd will set the following Android properties according to current system
configurations: configurations:

View File

@ -169,7 +169,6 @@ static inline void trace_kill_end() {}
/* ro.lmk.swap_compression_ratio property defaults */ /* ro.lmk.swap_compression_ratio property defaults */
#define DEF_SWAP_COMP_RATIO 1 #define DEF_SWAP_COMP_RATIO 1
/* ro.lmk.lowmem_min_oom_score defaults */ /* ro.lmk.lowmem_min_oom_score defaults */
#define DEF_LOWMEM_MIN_SCORE_LOWRAM (OOM_SCORE_ADJ_MAX + 1)
#define DEF_LOWMEM_MIN_SCORE (PREVIOUS_APP_ADJ + 1) #define DEF_LOWMEM_MIN_SCORE (PREVIOUS_APP_ADJ + 1)
#define LMKD_REINIT_PROP "lmkd.reinit" #define LMKD_REINIT_PROP "lmkd.reinit"
@ -4231,10 +4230,9 @@ static bool update_props() {
GET_LMK_PROPERTY(int64, "direct_reclaim_threshold_ms", DEF_DIRECT_RECL_THRESH_MS); GET_LMK_PROPERTY(int64, "direct_reclaim_threshold_ms", DEF_DIRECT_RECL_THRESH_MS);
swap_compression_ratio = swap_compression_ratio =
GET_LMK_PROPERTY(int64, "swap_compression_ratio", DEF_SWAP_COMP_RATIO); GET_LMK_PROPERTY(int64, "swap_compression_ratio", DEF_SWAP_COMP_RATIO);
lowmem_min_oom_score = std::max( lowmem_min_oom_score =
PERCEPTIBLE_APP_ADJ + 1, std::max(PERCEPTIBLE_APP_ADJ + 1,
GET_LMK_PROPERTY(int32, "lowmem_min_oom_score", GET_LMK_PROPERTY(int32, "lowmem_min_oom_score", DEF_LOWMEM_MIN_SCORE));
low_ram_device ? DEF_LOWMEM_MIN_SCORE_LOWRAM : DEF_LOWMEM_MIN_SCORE));
reaper.enable_debug(debug_process_killing); reaper.enable_debug(debug_process_killing);