From 506bd7e8cd8bbd048350779fd74cd6161afd3420 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Fri, 7 Feb 2020 23:36:58 -0800 Subject: [PATCH] simple_lmk: Disable OOM killer when Simple LMK is enabled The OOM killer only serves to be a liability when Simple LMK is used. Signed-off-by: Sultan Alsawaf --- mm/oom_kill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 42890ea52f11..c04cec730a76 100755 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -1052,7 +1052,7 @@ bool out_of_memory(struct oom_control *oc) unsigned long freed = 0; enum oom_constraint constraint = CONSTRAINT_NONE; - if (oom_killer_disabled) + if (oom_killer_disabled || IS_ENABLED(CONFIG_ANDROID_SIMPLE_LMK)) return false; if (try_online_one_block(numa_node_id())) {