linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: David Rientjes <rientjes@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Konstantin Khlebnikov <khlebnikov@openvz.org>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH] oom: skip frozen tasks
Date: Fri, 26 Aug 2011 13:01:50 +0200	[thread overview]
Message-ID: <20110826110150.GD9083@tiehlicka.suse.cz> (raw)
In-Reply-To: <20110826095356.GB9083@tiehlicka.suse.cz>

On Fri 26-08-11 11:53:56, Michal Hocko wrote:
> On Fri 26-08-11 02:21:42, David Rientjes wrote:
> > On Fri, 26 Aug 2011, Michal Hocko wrote:
> > 
> > > Let's give all frozen tasks a bonus (OOM_SCORE_ADJ_MAX/2) so that we do
> > > not consider them unless really necessary and if we really pick up one
> > > then thaw its threads before we try to kill it.
> > > 
> > 
> > I don't like arbitrary heuristics like this because they polluted the old 
> > oom killer before it was rewritten and made it much more unpredictable.  
> > The only heuristic it includes right now is a bonus for root tasks so that 
> > when two processes have nearly the same amount of memory usage (within 3% 
> > of available memory), the non-root task is chosen instead.
> > 
> > This bonus is actually saying that a single frozen task can use up to 50% 
> > more of the machine's capacity in a system-wide oom condition than the 
> > task that will now be killed instead.  That seems excessive.
> 
> Yes, the number is probably too high. I just wanted to start up with
> something. Maybe we can give it another root bonus. But I agree whatever
> we use it will be just a random value...
> 
> > 
> > I do like the idea of automatically thawing the task though and if that's 
> > possible then I don't think we need to manipulate the badness heuristic at 
> > all.  I know that wouldn't be feasible when we've frozen _all_ threads and 
> 
> Why it wouldn't be feasible for all threads? If you have all tasks
> frozen (suspend going on, whole cgroup or all tasks in a cpuset/nodemask
> are frozen) then the selection is more natural because all of them are
> equal (with or without a bonus). The bonus tries to reduce thawing if
> not all of them are frozen.
> I am not saying the bonus is necessary, though. It depends on what
> the freezer is used for (e.g. freeze a process which went wild and
> debug what went wrong wouldn't welcome that somebody killed it or other
> (mis)use which relies on D state).

Anyway, I do agree, the two things (bonus and thaw during oom_kill)
should be handled separately.

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-08-26 11:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23  8:31 Konstantin Khlebnikov
2011-08-23  9:15 ` KAMEZAWA Hiroyuki
2011-08-23 13:46 ` Michal Hocko
2011-08-23 20:18 ` David Rientjes
2011-08-24 10:19   ` Michal Hocko
2011-08-24 19:31     ` David Rientjes
2011-08-25  9:19       ` Michal Hocko
2011-08-25 15:18         ` Oleg Nesterov
2011-08-25 16:47           ` Michal Hocko
2011-08-25 21:14             ` David Rientjes
2011-08-26  7:09               ` Michal Hocko
2011-08-26  8:56                 ` Michal Hocko
2011-08-26  9:21                   ` David Rientjes
2011-08-26  9:53                     ` Michal Hocko
2011-08-26 11:01                       ` Michal Hocko [this message]
2011-08-26 18:13                       ` David Rientjes
2011-09-26  8:28                         ` [PATCH 1/2] oom: do not live lock on " Michal Hocko
2011-09-26  8:56                           ` David Rientjes
2011-09-26  9:14                             ` Michal Hocko
2011-09-26  9:25                               ` KAMEZAWA Hiroyuki
2011-09-26  9:32                                 ` Michal Hocko
2011-09-26 15:51                               ` Rafael J. Wysocki
2011-09-26 18:28                                 ` Michal Hocko
2011-09-27  1:03                                 ` David Rientjes
2011-09-27  7:52                                   ` Michal Hocko
2011-09-27 18:30                                     ` David Rientjes
2011-09-26 10:28                           ` Rusty Russell
2011-09-26 11:05                             ` Michal Hocko
2011-09-27  2:21                               ` Rusty Russell
2011-09-27  7:03                                 ` [PATCH] lguest: move process freezing before pending signals check Michal Hocko
2011-09-26  8:35                         ` [PATCH 2/2] oom: give bonus to frozen processes Michal Hocko
2011-09-26  9:02                           ` David Rientjes
2011-09-26  9:31                             ` KAMEZAWA Hiroyuki
2011-09-26  9:54                               ` Michal Hocko
2011-08-26 21:03                     ` [PATCH] oom: skip frozen tasks Rafael J. Wysocki
2011-08-26 10:03                   ` Konstantin Khlebnikov
2011-08-26 10:48                     ` Michal Hocko
2011-08-26 12:44                       ` Konstantin Khlebnikov
2011-08-26 12:59                         ` Michal Hocko
2011-08-26  7:35               ` Konstantin Khlebnikov
2011-08-26  9:09                 ` David Rientjes
2011-08-26  9:59                   ` Konstantin Khlebnikov
2011-08-26 18:09                     ` David Rientjes
2011-08-25 21:03           ` Rafael J. Wysocki

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=20110826110150.GD9083@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=khlebnikov@openvz.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=rjw@sisk.pl \
    /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