mm, oom: Modify default value of panic_on_oom

If a userspace low memory killer is present, the kernel oom killer
is not expected to be invoked. Therefore, trigger a reset on any
such occurrence.

Change-Id: I7f3451e9c4deb843b3e4dfa13e9764101e90b8ae
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
This commit is contained in:
Patrick Daly
2019-05-08 16:10:43 -07:00
parent aa9e75a9ff
commit e46816da22
2 changed files with 10 additions and 1 deletions

View File

@@ -41,6 +41,14 @@ config SLUB_DEBUG_PANIC_ON
investigating the root cause which may be rooted within cache
or memory.
config DEBUG_PANIC_ON_OOM
bool "Enable to Panic on OOM detection"
help
Android primarily uses an alternative mechanism to detect low
memory situations and kill processes as required. The kernel
oom-killer can mask problems with this feature, which may be
undesireable in a debug environment.
config DEBUG_PAGEALLOC_ENABLE_DEFAULT
bool "Enable debug page memory allocations by default?"
default n

View File

@@ -51,7 +51,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/oom.h>
int sysctl_panic_on_oom;
int sysctl_panic_on_oom =
IS_ENABLED(CONFIG_DEBUG_PANIC_ON_OOM) ? 2 : 0;
int sysctl_oom_kill_allocating_task;
int sysctl_oom_dump_tasks = 1;
int sysctl_reap_mem_on_sigkill;