From 2b744c01a54fe0c9974ff1b29522f25f07084053 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Sun, 6 May 2007 14:49:59 -0700 Subject: mm: fix handling of panic_on_oom when cpusets are in use The current panic_on_oom may not work if there is a process using cpusets/mempolicy, because other nodes' memory may remain. But some people want failover by panic ASAP even if they are used. This patch makes new setting for its request. This is tested on my ia64 box which has 3 nodes. Signed-off-by: Yasunori Goto Signed-off-by: Benjamin LaHaise Cc: Christoph Lameter Cc: Paul Jackson Cc: Ethan Solomita Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/oom_kill.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mm/oom_kill.c') diff --git a/mm/oom_kill.c b/mm/oom_kill.c index a35e7a8ebd7..038d2234f13 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -413,6 +413,9 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) show_mem(); } + if (sysctl_panic_on_oom == 2) + panic("out of memory. Compulsory panic_on_oom is selected.\n"); + cpuset_lock(); read_lock(&tasklist_lock); -- cgit v1.2.3