From: David Rientjes <rientjes@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <guro@fb.com>, Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
kernel-team@fb.com, cgroups@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [patch -mm 3/4] mm, memcg: replace memory.oom_group with policy tunable
Date: Mon, 22 Jan 2018 14:34:39 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.10.1801221420120.16871@chino.kir.corp.google.com> (raw)
In-Reply-To: <20180120123251.GB1096857@devbig577.frc2.facebook.com>
On Sat, 20 Jan 2018, Tejun Heo wrote:
> > Hearing no response, I'll implement this as a separate tunable in a v2
> > series assuming there are no better ideas proposed before next week. One
> > of the nice things about a separate tunable is that an admin can control
> > the overall policy and they can delegate the mechanism (killall vs one
> > process) to a user subtree. I agree with your earlier point that killall
> > vs one process is a property of the workload and is better defined
> > separately.
>
> If I understood your arguments correctly, the reasons that you thought
> your selectdion policy changes must go together with Roman's victim
> action were two-fold.
>
> 1. You didn't want a separate knob for group oom behavior and wanted
> it to be combined with selection policy. I'm glad that you now
> recognize that this would be the wrong design choice.
>
The memory.oom_action (or mechanism) file that I've proposed is different
than memory.oom_group: we want to provide a non-binary tunable to specify
what action that oom killer should effect. That could be to kill all
processes in the subtree, similar to memory.oom_group, the local cgroup,
or a different mechanism. I could propose the patchset backwards, if
necessary, because memory.oom_group is currently built upon a broken
selection heuristic. In other words, I could propose a memory.oom_action
that can specify two different mechanisms that would be useful outside of
any different selection function. However, since the mechanism is built
on top of the cgroup aware oom killer's policy, we can't merge it
currently without the broken logic.
> 2. The current selection policy may be exploited by delegatee and
> strictly hierarchical seleciton should be available. We can debate
> the pros and cons of different heuristics; however, to me, the
> followings are clear.
>
> * Strictly hierarchical approach can't replace the current policy.
> It doesn't work well for a lot of use cases.
>
-ECONFUSED. I haven't proposed any strict hierarchical approach here,
it's configurable by the user.
> * OOM victim selection policy has always been subject to changes
> and improvements.
>
That's fine, but the selection policy introduced by any cgroup aware oom
killer is being specified now and is pretty clear cut: compare the usage
of cgroups equally based on certain criteria and choose the largest. I
don't see how that could be changed or improved once the end user starts
using it, the heuristic has become a policy. A single cgroup aware policy
doesn't work, if you don't have localized, per-cgroup control you have
Michal's /admins and /students example; if you don't have hierarchical,
subtree control you have my example of users intentionally/unintentionally
evading the selection logic based on using cgroups. The policy needs to
be defined for subtrees. There hasn't been any objection to that, so
introducing functionality that adds a completely unnecessary and broken
mount option and forces users to configure cgroups in a certain manner
that no longer exists with subtree control doesn't seem helpful.
> I don't see any blocker here. The issue you're raising can and should
> be handled separately.
>
It can't, because the current patchset locks the system into a single
selection criteria that is unnecessary and the mount option would become a
no-op after the policy per subtree becomes configurable by the user as
part of the hierarchy itself.
> Here, whether a workload can survive being killed piece-wise or not is
> an inherent property of the workload and a pretty binary one at that.
> I'm not necessarily against changing it to take string inputs but
> don't see rationales for doing so yet.
>
We don't need the unnecessary level in the cgroup hierarchy that enables
memory.oom_group, as proposed, and serves no other purpose. It's
perfectly valid for subtrees to run user executors whereas a "killall"
mechanism is valid for some workloads and not others. We do not need
ancestor cgroups locking that decision into place.
--
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:[~2018-01-22 22:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 2:14 [patch -mm 0/4] mm, memcg: introduce oom policies David Rientjes
2018-01-17 2:15 ` [patch -mm 1/4] mm, memcg: introduce per-memcg oom policy tunable David Rientjes
2018-01-17 2:15 ` [patch -mm 2/4] mm, memcg: replace cgroup aware oom killer mount option with tunable David Rientjes
2018-01-17 2:15 ` [patch -mm 3/4] mm, memcg: replace memory.oom_group with policy tunable David Rientjes
2018-01-17 15:41 ` Tejun Heo
2018-01-17 16:00 ` Michal Hocko
2018-01-17 22:18 ` David Rientjes
2018-01-23 15:13 ` Michal Hocko
2018-01-17 22:14 ` David Rientjes
2018-01-19 20:53 ` David Rientjes
2018-01-20 12:32 ` Tejun Heo
2018-01-22 22:34 ` David Rientjes [this message]
2018-01-23 15:53 ` Michal Hocko
2018-01-23 22:22 ` David Rientjes
2018-01-24 8:20 ` Michal Hocko
2018-01-24 21:44 ` David Rientjes
2018-01-24 22:08 ` Andrew Morton
2018-01-24 22:18 ` Tejun Heo
2018-01-25 8:11 ` Michal Hocko
2018-01-25 8:05 ` Michal Hocko
2018-01-25 23:27 ` David Rientjes
2018-01-26 10:07 ` Michal Hocko
2018-01-26 22:33 ` David Rientjes
2018-01-17 2:15 ` [patch -mm 4/4] mm, memcg: add hierarchical usage oom policy David Rientjes
2018-01-17 11:46 ` [patch -mm 0/4] mm, memcg: introduce oom policies Roman Gushchin
2018-01-17 22:31 ` David Rientjes
2018-01-25 23:53 ` [patch -mm v2 0/3] " David Rientjes
2018-01-25 23:53 ` [patch -mm v2 1/3] mm, memcg: introduce per-memcg oom policy tunable David Rientjes
2018-01-26 17:15 ` Michal Hocko
2018-01-29 22:38 ` David Rientjes
2018-01-30 8:50 ` Michal Hocko
2018-01-30 22:38 ` David Rientjes
2018-01-31 9:47 ` Michal Hocko
2018-02-01 10:11 ` David Rientjes
2018-01-25 23:53 ` [patch -mm v2 2/3] mm, memcg: replace cgroup aware oom killer mount option with tunable David Rientjes
2018-01-26 0:00 ` Andrew Morton
2018-01-26 22:20 ` David Rientjes
2018-01-26 22:39 ` Andrew Morton
2018-01-26 22:52 ` David Rientjes
2018-01-27 0:17 ` Andrew Morton
2018-01-29 10:46 ` Michal Hocko
2018-01-29 19:11 ` Tejun Heo
2018-01-30 8:54 ` Michal Hocko
2018-01-30 11:58 ` Roman Gushchin
2018-01-30 12:08 ` Michal Hocko
2018-01-30 12:13 ` Roman Gushchin
2018-01-30 12:20 ` Michal Hocko
2018-01-30 15:15 ` Tejun Heo
2018-01-30 17:30 ` Johannes Weiner
2018-01-30 19:39 ` Andrew Morton
2018-01-29 22:16 ` David Rientjes
2018-01-25 23:53 ` [patch -mm v2 3/3] mm, memcg: add hierarchical usage oom policy 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.10.1801221420120.16871@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=tj@kernel.org \
--cc=vdavydov.dev@gmail.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