add min score option to PRESSURE_AFTER_KILL am: 18578a55d0 am: 3fe819c85f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2868426 Change-Id: I843f99dc21bc34e719a979b2b616a54ab6dba1c6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
9ae8f1fd20
|
|
@ -88,6 +88,10 @@ properties:
|
|||
- `ro.lmk.psi_complete_stall_ms`: complete PSI stall threshold in milliseconds for
|
||||
triggering critical memory notification. Default =
|
||||
700
|
||||
- `ro.lmk.pressure_after_kill_min_score`: min oom_adj_score score threshold for
|
||||
cycle after kill used to allow blocking of killing
|
||||
critical processes when not enough memory was freed
|
||||
in a kill cycle. Default score = 0.
|
||||
|
||||
lmkd will set the following Android properties according to current system
|
||||
configurations:
|
||||
|
|
|
|||
4
lmkd.cpp
4
lmkd.cpp
|
|
@ -204,6 +204,7 @@ static int64_t downgrade_pressure;
|
|||
static bool low_ram_device;
|
||||
static bool kill_heaviest_task;
|
||||
static unsigned long kill_timeout_ms;
|
||||
static int pressure_after_kill_min_score;
|
||||
static bool use_minfree_levels;
|
||||
static bool per_app_memcg;
|
||||
static int swap_free_low_percentage;
|
||||
|
|
@ -2769,6 +2770,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
|||
* This might happen when a process is consuming memory faster than reclaim can
|
||||
* free even after a kill. Mostly happens when running memory stress tests.
|
||||
*/
|
||||
min_score_adj = pressure_after_kill_min_score;
|
||||
kill_reason = PRESSURE_AFTER_KILL;
|
||||
strncpy(kill_desc, "min watermark is breached even after kill", sizeof(kill_desc));
|
||||
} else if (level == VMPRESS_LEVEL_CRITICAL && events != 0) {
|
||||
|
|
@ -3771,6 +3773,8 @@ static bool update_props() {
|
|||
low_ram_device = property_get_bool("ro.config.low_ram", false);
|
||||
kill_timeout_ms =
|
||||
(unsigned long)GET_LMK_PROPERTY(int32, "kill_timeout_ms", 100);
|
||||
pressure_after_kill_min_score =
|
||||
(unsigned long)GET_LMK_PROPERTY(int32, "pressure_after_kill_min_score", 0);
|
||||
use_minfree_levels =
|
||||
GET_LMK_PROPERTY(bool, "use_minfree_levels", false);
|
||||
per_app_memcg =
|
||||
|
|
|
|||
Loading…
Reference in New Issue