From: David Rientjes <rientjes@google.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
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: Fri, 30 Jul 2010 13:14:24 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1007301254270.7008@chino.kir.corp.google.com> (raw)
In-Reply-To: <20100730195338.4AF6.A69D9226@jp.fujitsu.com>
On Fri, 30 Jul 2010, KOSAKI Motohiro wrote:
> Major homework are
>
> - make patch series instead unreviewable all in one patch.
Hi, KOSAKI.
We've talked about this point many times. This particular patch simply
cannot be split up into multiple patches without dropping existing
behavior without forward-looking statements that they're going to be
readded later. For example, I cannot remove the heuristic that lowers the
score for CAP_SYS_ADMIN tasks from the current implementation and then say
"it will be readded in a later patch." That makes it much more difficult
to review since it takes a lot more effort to ensure nothing was dropped
that we still need. As a consequence, oom_badness() needs to be rewritten
in its entirety (although the majority of changes are deleting lines from
the current implementation :) and there are consequences in other areas of
code like changing function signatures and passing the necessary
information that the heuristic now uses: the total amount of memory that
the application is bound to, depending on the context in which the oom
killer was called.
I've said all of that many times so perhaps it was a misunderstanding
before and now it's more clear after this iteration. I don't know. But
I'd prefer that if the maintainer, Andrew, disagrees with the methodology
used to generate this patche (and has said he accepts total rewrites in
the past, even in the discussion regarding this one), that he disagree
with the paragraph above. Otherwise we end up talking in circles.
I've made great efforts to make this rewrite happen because it
significantly improves the oom killer's behavior on the desktop as well as
enables us to have a much more powerful tunable for server systems to
prioritize oom killing. For example, I dropped the forkbomb detector in
this iteration since it was pretty controversial. I'd appreciate it if
you could take the time to review the patch.
> - kill oom_score_adj
I don't quite understand where this is coming from since there's no
reasoning given, but oom_score_adj is vital to the ability of userspace to
tune the new heuristic's baseline. It is the first time we've ever had
the ability to tune the oom killing priority of a task based on an actual
unit. oom_adj does not work with the new heuristic, which ranks tasks by
a proportion of resident memory to allowed memory. That ranking is
necessary because oom killing priority only makes sense when considered
relative to other candidate tasks: we want to kill the memory hogging task
and we don't want to reset oom_adj anytime that task is attached to a
memcg, a cpuset, or a mempolicy. It's unreasonable to expect userspace to
tune oom_adj whenever its attachment to a memcg, a cpuset, or a mempolicy
changes, and whenever their traits changes: the memcg limit changes, the
set of allowed cpuset mems changes, or the set of allowed mempolicy nodes
changes.
> - write test way and test result
>
I've stated multiple times, and the example is mentioned in the changelog,
that this change prefers to kill memory hogging tasks over X on a desktop
system as the result of these changes. The remainder of the change is
enabling a more powerful interface for server systems that we need to
introduce with the new heuristic since oom_adj is obsoleted in that case.
Perhaps we both don't face the same challenges when it comes to tuning the
oom killer, so you don't fully understand the problem that I'm addressing
here. I've stated the importance of oom_score_adj above, I hope you would
understand that other people use the oom killer for different reasons
other than your own and we need this interface.
--
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-07-30 20:15 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 [this message]
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
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=alpine.DEB.2.00.1007301254270.7008@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=oleg@redhat.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