From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 18 Sep 2007 13:06:04 -0700 (PDT) From: David Rientjes Subject: Re: [patch 4/4] oom: serialize out of memory calls In-Reply-To: Message-ID: References: <871b7a4fd566de081120.1187786931@v2.random> 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 , linux-mm@kvack.org List-ID: On Tue, 18 Sep 2007, Christoph Lameter wrote: > trylocks return 1 = true if the lock was acquire. 0 = > false if not. > > F.e. > > #define __raw_spin_trylock(x) (cmpxchg_acq(&(x)->lock, 0, 1) == > 0) > Yes, but this would require a change in oom_killer_trylock() since it is coded to return non-zero if the OOM killer has already been invoked for at least one of the zones. The use of "trylock" here is being abused anyway since there's actually no locks involved, so maybe the function pair should simply be renamed to zone_in_oom() and zonelist_clear_oom(). I'll make the change, thanks for keeping it consistent. -- 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