Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751310Ab0BWIRk (ORCPT ); Tue, 23 Feb 2010 03:17:40 -0500 Received: from smtp-out.google.com ([216.239.33.17]:2501 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953Ab0BWIRi (ORCPT ); Tue, 23 Feb 2010 03:17:38 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id: references:user-agent:mime-version:content-type:x-system-of-record; b=jW2FvlAo0YbNJXvmgm0RNwGyqOyGLzajGSduGu2TBN8Xf+Kmc8TJdhZjXoPryPg6u sLmqsitdntTOQuVqyIHzQ== Date: Tue, 23 Feb 2010 00:17:26 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Balbir Singh cc: Andrew Morton , Rik van Riel , KAMEZAWA Hiroyuki , Nick Piggin , Andrea Arcangeli , Lubos Lunak , KOSAKI Motohiro , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch -mm 3/9 v2] oom: select task from tasklist for mempolicy ooms In-Reply-To: <20100223063129.GI3063@balbir.in.ibm.com> Message-ID: References: <20100223063129.GI3063@balbir.in.ibm.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 27 On Tue, 23 Feb 2010, Balbir Singh wrote: > > The oom killer presently kills current whenever there is no more memory > > free or reclaimable on its mempolicy's nodes. There is no guarantee that > > current is a memory-hogging task or that killing it will free any > > substantial amount of memory, however. > > > > In such situations, it is better to scan the tasklist for nodes that are > > allowed to allocate on current's set of nodes and kill the task with the > > highest badness() score. This ensures that the most memory-hogging task, > > or the one configured by the user with /proc/pid/oom_adj, is always > > selected in such scenarios. > > > > Signed-off-by: David Rientjes > > Seems reasonable, but I think it will require lots of testing. I already tested it by checking that tasks with very elevated oom_adj values don't get killed when they do not share the same MPOL_BIND nodes as a memory-hogging task. What additional testing did you have in mind? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/