From: Michal Hocko <mhocko@suse.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Yafang Shao <shaoyafang@didiglobal.com>,
Roman Gushchin <guro@fb.com>,
Souptick Joarder <jrdr.linux@gmail.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Randy Dunlap <rdunlap@infradead.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] mm, memcg: skip killing processes under memcg protection at first scan
Date: Tue, 20 Aug 2019 12:40:22 +0200 [thread overview]
Message-ID: <20190820104022.GN3111@dhcp22.suse.cz> (raw)
In-Reply-To: <CALOAHbB68w0miNE7FBASyMi=ou58AfsQTOkFY3fXgZi0w2aMrQ@mail.gmail.com>
On Tue 20-08-19 17:26:49, Yafang Shao wrote:
> On Tue, Aug 20, 2019 at 5:17 PM Michal Hocko <mhocko@suse.com> wrote:
[...]
> > > As there's a memory.oom.group option to select killing all processes
> > > in a memcg, why not introduce a memcg level memcg.oom.score_adj?
> >
> > Because the oom selection is process based as already mentioned. There
> > was a long discussion about memcg based oom victim selection last year
> > but no consensus has been achieved.
> >
> > > Then we can set different scores to different memcgs.
> > > Because we always deploy lots of containers on a single host, when OOM
> > > occurs it will better to prefer killing the low priority containers
> > > (with higher memcg.oom.score_adj) first.
> >
> > How would you define low priority container with score_adj?
> >
>
> For example, Container-A is high priority and Container-B is low priority.
> When OOM killer happens we prefer to kill all processes in Container-B
> and prevent Container-A from being killed.
> So we set memroy.oom.score_adj with -1000 to Container-A and +1000
> to Container-B, both container with memory.oom.cgroup set.
> When we set memroy.oom.score_adj to a container, all processes
> belonging to this container will be set this value to their own
> oom_score_adj.
I hope you can see that this on/off mechanism doesn't scale and thus it
is a dubious interface. Just think of mutlitple containers.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-08-20 10:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 1:18 Yafang Shao
2019-08-19 21:12 ` Roman Gushchin
2019-08-20 1:16 ` Yafang Shao
2019-08-20 1:39 ` Roman Gushchin
2019-08-20 2:01 ` Yafang Shao
2019-08-20 2:40 ` Yafang Shao
2019-08-20 6:40 ` Michal Hocko
2019-08-20 7:15 ` Yafang Shao
2019-08-20 7:27 ` Michal Hocko
2019-08-20 7:49 ` Yafang Shao
2019-08-20 8:34 ` Michal Hocko
2019-08-20 8:55 ` Yafang Shao
2019-08-20 9:17 ` Michal Hocko
2019-08-20 9:26 ` Yafang Shao
2019-08-20 10:40 ` Michal Hocko [this message]
2019-08-20 21:39 ` Roman Gushchin
2019-08-21 1:00 ` Yafang Shao
2019-08-21 6:44 ` Michal Hocko
2019-08-21 7:26 ` Yafang Shao
2019-08-21 8:05 ` Michal Hocko
2019-08-21 8:15 ` Yafang Shao
2019-08-21 8:34 ` Michal Hocko
2019-08-21 8:46 ` Yafang Shao
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=20190820104022.GN3111@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=jrdr.linux@gmail.com \
--cc=laoar.shao@gmail.com \
--cc=linux-mm@kvack.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rdunlap@infradead.org \
--cc=shaoyafang@didiglobal.com \
--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