linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: David Rientjes <rientjes@google.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Oleg Nesterov <oleg@redhat.com>, Ying Han <yinghan@google.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] oom: do not kill tasks with oom_score_adj OOM_SCORE_ADJ_MIN
Date: Mon, 7 Nov 2011 23:18:48 +0100	[thread overview]
Message-ID: <20111107221847.GA7985@tiehlicka.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.00.1111071353140.27419@chino.kir.corp.google.com>

On Mon 07-11-11 13:54:38, David Rientjes wrote:
> On Fri, 4 Nov 2011, Michal Hocko wrote:
> 
> > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > index e916168..4883514 100644
> > --- a/mm/oom_kill.c
> > +++ b/mm/oom_kill.c
> > @@ -185,6 +185,9 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
> >  	if (!p)
> >  		return 0;
> >  
> > +	if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
> > +		return 0;
> > +
> >  	/*
> >  	 * The memory controller may have a limit of 0 bytes, so avoid a divide
> >  	 * by zero, if necessary.
> 
> This leaves p locked, you need to do task_unlock(p) first.

Yes, right you are. Thanks for spotting this out.

> 
> Once that's fixed, please add my
> 
> 	Acked-by: David Rientjes <rientjes@google.com>

Thanks.

> and resubmit to Andrew for the 3.2 rc series.  Thanks!

Andrew, could you push this for 3.2 (bugfix for post 3.1 kernel).

---

  reply	other threads:[~2011-11-07 22:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-04 11:59 Michal Hocko
2011-11-07 21:54 ` David Rientjes
2011-11-07 22:18   ` Michal Hocko [this message]
2011-11-07 22:22   ` KOSAKI Motohiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111107221847.GA7985@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.com \
    --cc=rientjes@google.com \
    --cc=yinghan@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox