* [patch -mm] oom: move sysctl declarations to oom.h
@ 2010-03-25 22:53 David Rientjes
0 siblings, 0 replies; only message in thread
From: David Rientjes @ 2010-03-25 22:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm
The three oom killer sysctl variables (sysctl_panic_on_oom,
sysctl_oom_forkbomb_thres, and sysctl_oom_kill_quick) are better declared
in include/linux/oom.h rather than kernel/sysctl.c.
Signed-off-by: David Rientjes <rientjes@google.com>
---
include/linux/oom.h | 6 ++++++
kernel/sysctl.c | 4 +---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/oom.h b/include/linux/oom.h
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -61,5 +61,11 @@ static inline void oom_killer_enable(void)
{
oom_killer_disabled = false;
}
+
+/* sysctls */
+extern int sysctl_panic_on_oom;
+extern int sysctl_oom_forkbomb_thres;
+extern int sysctl_oom_kill_quick;
+
#endif /* __KERNEL__*/
#endif /* _INCLUDE_LINUX_OOM_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -53,6 +53,7 @@
#include <linux/slow-work.h>
#include <linux/perf_event.h>
#include <linux/kprobes.h>
+#include <linux/oom.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
@@ -81,9 +82,6 @@
/* External variables not in a header file. */
extern int sysctl_overcommit_memory;
extern int sysctl_overcommit_ratio;
-extern int sysctl_panic_on_oom;
-extern int sysctl_oom_kill_quick;
-extern int sysctl_oom_forkbomb_thres;
extern int max_threads;
extern int core_uses_pid;
extern int suid_dumpable;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-25 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-25 22:53 [patch -mm] oom: move sysctl declarations to oom.h David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox