From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 21 Sep 2007 01:59:24 -0700 From: Andrew Morton Subject: Re: [patch 4/9] oom: add per-zone locking Message-Id: <20070921015924.62959c24.akpm@linux-foundation.org> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: David Rientjes Cc: Christoph Lameter , Andrea Arcangeli , Rik van Riel , linux-mm@kvack.org List-ID: On Thu, 20 Sep 2007 15:48:36 -0700 (PDT) David Rientjes wrote: > > The global lock there just spooks me. If a large number of processors get > > in there (say 1000 or so in the case of a global oom) then there is > > already an issue of getting the lock from node 0. The bits in the zone > > are distributed over all of the nodes in the system. > > > > It's no more harder to acquire than callback_mutex was. It's far better > to include this global lock so the state of the zones are always correct > after releasing it than to have 1000 processors clearing and setting > ZONE_OOM_LOCKED bits for lengthy zonelists and all racing with each other > so no zonelist is ever fully locked. It'd be better to use a spinlock than a sleeping lock: same speed in the uncontended case, heaps faster in the contended case. -- 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