linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Roman Gushchin <guro@fb.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	 Randy Dunlap <rdunlap@infradead.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Michal Hocko <mhocko@suse.com>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	 Souptick Joarder <jrdr.linux@gmail.com>,
	Yafang Shao <shaoyafang@didiglobal.com>
Subject: Re: [PATCH v2] mm, memcg: skip killing processes under memcg protection at first scan
Date: Wed, 21 Aug 2019 09:00:39 +0800	[thread overview]
Message-ID: <CALOAHbBSUPkw-XZBGooGZ9o7HcD5fbavG0bPDFCnYAFqqX8MGA@mail.gmail.com> (raw)
In-Reply-To: <20190820213905.GB12897@tower.DHCP.thefacebook.com>

On Wed, Aug 21, 2019 at 5:39 AM Roman Gushchin <guro@fb.com> wrote:
>
> On Sun, Aug 18, 2019 at 09:18:06PM -0400, Yafang Shao wrote:
> > In the current memory.min design, the system is going to do OOM instead
> > of reclaiming the reclaimable pages protected by memory.min if the
> > system is lack of free memory. While under this condition, the OOM
> > killer may kill the processes in the memcg protected by memory.min.
> > This behavior is very weird.
> > In order to make it more reasonable, I make some changes in the OOM
> > killer. In this patch, the OOM killer will do two-round scan. It will
> > skip the processes under memcg protection at the first scan, and if it
> > can't kill any processes it will rescan all the processes.
> >
> > Regarding the overhead this change may takes, I don't think it will be a
> > problem because this only happens under system  memory pressure and
> > the OOM killer can't find any proper victims which are not under memcg
> > protection.
>
> Also, after the second thought, what your patch really does,
> it basically guarantees that no processes out of memory cgroups
> with memory.min set will be ever killed (unless there are any other
> processes). In most cases (at least on our setups) it's basically
> makes such processes immune to the OOM killer (similar to oom_score_adj
> set to -1000).
>

Actually it is between -999 and -1000.

> This is by far a too strong side effect of setting memory.min,
> so I don't think the idea is acceptable at all.
>

More possible OOMs is also a strong side effect (and it prevent us
from using it).
Leave all other works to the userspace is not proper.
We should improve it.

Thanks
Yafang


  reply	other threads:[~2019-08-21  1:01 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
2019-08-20 21:39 ` Roman Gushchin
2019-08-21  1:00   ` Yafang Shao [this message]
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=CALOAHbBSUPkw-XZBGooGZ9o7HcD5fbavG0bPDFCnYAFqqX8MGA@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --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