From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 20 Sep 2007 15:07:11 -0700 (PDT) From: David Rientjes Subject: Re: [patch 6/9] oom: add oom_kill_asking_task sysctl In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Andrew Morton , Andrea Arcangeli , Rik van Riel , linux-mm@kvack.org, pj@sgi.com List-ID: On Thu, 20 Sep 2007, Christoph Lameter wrote: > Acked-by: Christoph Lameter > > Maybe we need this also for unconstrained allocations? > It already is, here's the relevant code (CONSTRAINT_NONE falls through to check sysctl_oom_kill_asking_task. CONSTRAINT_MEMORY_POLICY will be modified in a separate patchset since it doesn't have anything to do with the serialization. [ Ok, well modifying CONSTRAINT_CPUSET didn't really have anything to do with serialization either, but it's included in this patchset so we can eliminate the need to take callback_mutex. ] @@ -478,14 +479,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) "No available memory (MPOL_BIND)"); break; - case CONSTRAINT_CPUSET: - oom_kill_process(current, points, - "No available memory in cpuset"); - break; - case CONSTRAINT_NONE: if (sysctl_panic_on_oom) panic("out of memory. panic_on_oom is selected\n"); + /* Fall-through */ + case CONSTRAINT_CPUSET: + if (sysctl_oom_kill_asking_task) { + oom_kill_process(current, points, + "Out of memory (oom_kill_asking_task)"); + break; + } retry: /* * Rambo mode: Shoot down a process and hope it solves whatever -- 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: email@kvack.org