From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 12 Sep 2007 12:08:43 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH 23 of 24] serialize for cpusets In-Reply-To: <20070912061003.39506e07.akpm@linux-foundation.org> Message-ID: References: <20070912061003.39506e07.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: Andrea Arcangeli , linux-mm@kvack.org, Christoph Lameter , Paul Jackson List-ID: On Wed, 12 Sep 2007, Andrew Morton wrote: > > # HG changeset patch > > # User David Rientjes > > # Date 1187778125 -7200 > > # Node ID a3d679df54ebb1f977b97ab6b3e501134bf9e7ef > > # Parent 8807a4d14b241b2d1132fde7f83834603b6cf093 > > serialize for cpusets > > > > Adds a last_tif_memdie_jiffies field to struct cpuset to store the > > jiffies value at the last OOM kill. This will detect deadlocks in the > > CONSTRAINT_CPUSET case and kill another task if its detected. > > > > Adds a CS_OOM bit to struct cpuset's flags field. This will be tested, > > set, and cleared atomically to denote a cpuset that currently has an > > attached task exiting as a result of the OOM killer. We are required to > > take p->alloc_lock to dereference p->cpuset so this cannot be implemented > > as a simple trylock. > > > > As a result, we cannot allow the detachment of a task from a cpuset that > > is currently OOM killing one of its tasks. If we did, we would end up > > clearing the CS_OOM bit in the wrong cpuset upon that task's exit. > > > > sysctl's panic_on_oom is now only effected in the non-cpuset-constrained > > case. > > > > Cc: Andrea Arcangeli > > Cc: Christoph Lameter > > Signed-off-by: David Rientjes > > I understand that SGI's HPC customers care rather a lot about oom handling > in cpusets. It'd be nice if people@sgi could carefully review-and-test > changes such as this before we go and break stuff for them, please. > During the initial review of this change, Paul Jackson suggested adding oom_kill_asking_task, which the next patch in this series does, to switch this on and 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