From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 12 Sep 2007 17:52:34 -0700 (PDT) From: Christoph Lameter Subject: Re: [PATCH 17 of 24] apply the anti deadlock features only to global oom 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: Andrea Arcangeli Cc: linux-mm@kvack.org, David Rientjes List-ID: On Wed, 22 Aug 2007, Andrea Arcangeli wrote: > switch (constraint) { > case CONSTRAINT_MEMORY_POLICY: > + read_lock(&tasklist_lock); > oom_kill_process(current, points, > "No available memory (MPOL_BIND)", gfp_mask, order); > + read_unlock(&tasklist_lock); > break; > > case CONSTRAINT_CPUSET: > + read_lock(&tasklist_lock); > oom_kill_process(current, points, > "No available memory in cpuset", gfp_mask, order); > + read_unlock(&tasklist_lock); > break; > > case CONSTRAINT_NONE: > + if (down_trylock(&OOM_lock)) > + break; > + read_lock(&tasklist_lock); Hmmmm... The point is to take the OOM lock later to leave the NUMA stuff out. However, there is already a per cpuset lock being taken that could be useful also as a global lock if cpusets is off. -- 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