From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with SMTP id CD61A6B01E3 for ; Fri, 2 Apr 2010 17:07:05 -0400 (EDT) Date: Fri, 2 Apr 2010 23:04:59 +0200 From: Oleg Nesterov Subject: Re: [patch -mm] oom: exclude tasks with badness score of 0 from being selected Message-ID: <20100402210459.GA5112@redhat.com> References: <20100331175836.GA11635@redhat.com> <20100331204718.GD11635@redhat.com> <20100401135927.GA12460@redhat.com> <20100402111406.GA4432@redhat.com> <20100402191414.GA982@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: Andrew Morton , anfei , KOSAKI Motohiro , nishimura@mxp.nes.nec.co.jp, KAMEZAWA Hiroyuki , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org List-ID: On 04/02, David Rientjes wrote: > > An oom_badness() score of 0 means "never kill" according to > Documentation/filesystems/proc.txt, so explicitly exclude it from being > selected for kill. These tasks have either detached their p->mm or are > set to OOM_DISABLE. Agreed, but > @@ -336,6 +336,8 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, > continue; > > points = oom_badness(p, totalpages); > + if (!points) > + continue; > if (points > *ppoints || !chosen) { then "|| !chosen" can be killed. with this patch !chosen <=> !*ppoints, and since points > 0 if (points > *ppoints) { is enough. Oleg. -- 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