[PATCH] support for panic at OOM
This patch adds panic_on_oom sysctl under sys.vm. When sysctl vm.panic_on_oom = 1, the kernel panics intead of killing rogue processes. And if vm.panic_on_oom is 0 the kernel will do oom_kill() in the same way as it does today. Of course, the default value is 0 and only root can modifies it. In general, oom_killer works well and kill rogue processes. So the whole system can survive. But there are environments where panic is preferable rather than kill some processes. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
67de648211
commit
fadd8fbd15
@@ -186,6 +186,7 @@ enum
|
||||
VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
|
||||
VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
|
||||
VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */
|
||||
VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user