Commit 8e4228e1edb922afa83366803a1e5b3fa8e987c2

Authored by David Rientjes
Committed by Linus Torvalds
1 parent e365893236

oom: move sysctl declarations to oom.h

The three oom killer sysctl variables (sysctl_oom_dump_tasks,
sysctl_oom_kill_allocating_task, and sysctl_panic_on_oom) are better
declared in include/linux/oom.h rather than kernel/sysctl.c.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 2 changed files with 6 additions and 3 deletions Side-by-side Diff

... ... @@ -44,6 +44,11 @@
44 44 {
45 45 oom_killer_disabled = false;
46 46 }
  47 +
  48 +/* sysctls */
  49 +extern int sysctl_oom_dump_tasks;
  50 +extern int sysctl_oom_kill_allocating_task;
  51 +extern int sysctl_panic_on_oom;
47 52 #endif /* __KERNEL__*/
48 53 #endif /* _INCLUDE_LINUX_OOM_H */
... ... @@ -53,6 +53,7 @@
53 53 #include <linux/perf_event.h>
54 54 #include <linux/kprobes.h>
55 55 #include <linux/pipe_fs_i.h>
  56 +#include <linux/oom.h>
56 57  
57 58 #include <asm/uaccess.h>
58 59 #include <asm/processor.h>
... ... @@ -85,9 +86,6 @@
85 86 /* External variables not in a header file. */
86 87 extern int sysctl_overcommit_memory;
87 88 extern int sysctl_overcommit_ratio;
88   -extern int sysctl_panic_on_oom;
89   -extern int sysctl_oom_kill_allocating_task;
90   -extern int sysctl_oom_dump_tasks;
91 89 extern int max_threads;
92 90 extern int core_uses_pid;
93 91 extern int suid_dumpable;