From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Nick Piggin <npiggin@suse.de>, Oleg Nesterov <oleg@redhat.com>,
Balbir Singh <balbir@in.ibm.com>,
linux-mm@kvack.org
Subject: Re: [patch -mm 1/2] oom: badness heuristic rewrite
Date: Tue, 3 Aug 2010 13:32:55 +0900 [thread overview]
Message-ID: <20100803133255.deb5c208.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1008022117200.4146@chino.kir.corp.google.com>
On Mon, 2 Aug 2010 21:20:40 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> On Tue, 3 Aug 2010, KAMEZAWA Hiroyuki wrote:
>
> > > Yes, but this is what oom_score_adj is intended to do: an oom_score_adj of
> > > 300 means task A should be penalized 30% of available memory. A positive
> > > oom_score_adj typically means "all other competing tasks should be allowed
> > > 30% more memory, cumulatively, compared to this task." Task A uses ~10%
> > > of available memory and task B uses 50% of available memory. That's a 40%
> > > difference, which is greater than task A's penalization of 30%, so B is
> > > killed.
> > >
> >
> > This will confuse LXC(Linux Container) guys. oom_score is unusable anymore.
> >
>
> From Documentation/filesystems/proc.txt in 2.6.35:
>
> 3.2 /proc/<pid>/oom_score - Display current oom-killer score
> -------------------------------------------------------------
>
> This file can be used to check the current score used by the
> oom-killer is for any given <pid>. Use it together with
> /proc/<pid>/oom_adj to tune which process should be killed in an
> out-of-memory situation.
>
> That is unchanged with the rewrite. /proc/pid/oom_score still exports the
> badness() score used by the oom killer to determine which task to kill:
> the highest score will be killed amongst candidate tasks. The fact that
> the score can be influenced by cpuset, memcg, or mempolicy constraint is
> irrelevant, we cannot assume anything about the badness() heuristic's
> implementation from the score itself.
>
In old behavior, oom_score order is synchronous both in the system and
container. High-score one will be killed.
IOW, oom_score have worked as oom_score.
But, after the patch, the user (of LXC at el.) can't trust oom_score.
Especially with memcg, it just shows a _broken_ value.
And user has to caluculate oom_score by himself as
real_oom_score = (oom_score - oom_score_adj) *
system_memory/container_memory + oom_score_adj.
I'm wrong ? Anyway, I think you should take care of this issue.
Maybe this breaks google's oom-killer+cpuset system.
Thanks,
-Kame
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-08-03 4:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 19:16 David Rientjes
2010-07-17 19:16 ` [patch -mm 2/2] oom: deprecate oom_adj tunable David Rientjes
2010-07-29 23:08 ` [patch -mm 1/2] oom: badness heuristic rewrite Andrew Morton
2010-07-30 0:12 ` KOSAKI Motohiro
2010-07-30 1:38 ` Andrew Morton
2010-07-30 11:02 ` KOSAKI Motohiro
2010-07-30 20:14 ` David Rientjes
2010-08-02 20:43 ` Andrew Morton
2010-08-03 0:00 ` KAMEZAWA Hiroyuki
2010-08-03 0:27 ` David Rientjes
2010-08-03 0:36 ` KAMEZAWA Hiroyuki
2010-08-03 1:02 ` David Rientjes
2010-08-03 1:08 ` KAMEZAWA Hiroyuki
2010-08-03 1:24 ` KAMEZAWA Hiroyuki
2010-08-03 1:52 ` David Rientjes
2010-08-03 2:05 ` KAMEZAWA Hiroyuki
2010-08-03 3:05 ` David Rientjes
2010-08-03 3:11 ` KAMEZAWA Hiroyuki
2010-08-03 4:20 ` David Rientjes
2010-08-03 4:32 ` KAMEZAWA Hiroyuki [this message]
2010-08-03 7:23 ` David Rientjes
2010-08-03 7:21 ` KAMEZAWA Hiroyuki
2010-08-03 7:27 ` KAMEZAWA Hiroyuki
2010-08-03 20:43 ` David Rientjes
2010-08-03 1:50 ` David Rientjes
2010-08-03 1:50 ` KAMEZAWA Hiroyuki
2010-08-03 6:00 ` KOSAKI Motohiro
2010-08-03 7:16 ` David Rientjes
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=20100803133255.deb5c208.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=oleg@redhat.com \
--cc=rientjes@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