linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH v2] mm, memcg: avoid oom if cgroup is not populated
Date: Wed, 27 Nov 2019 17:17:05 +0800	[thread overview]
Message-ID: <CALOAHbAviqC1q11z8rh5F1gNJw2EmZUMBV-CkZ7wKvAAwfeccQ@mail.gmail.com> (raw)
In-Reply-To: <20191127085436.GN20912@dhcp22.suse.cz>

On Wed, Nov 27, 2019 at 4:54 PM Michal Hocko <mhocko@kernel.org> wrote:
>
> On Tue 26-11-19 20:28:37, Yafang Shao wrote:
> > There's one case that the processes in a memcg are all exit (due to OOM
> > group or some other reasons), but the file page caches are still exist.
> > These file page caches may be protected by memory.min so can't be
> > reclaimed. If we can't success to restart the processes in this memcg or
> > don't want to make this memcg offline, then we want to drop the file page
> > caches.
> > The advantage of droping this file caches is it can avoid the reclaimer
> > (either kswapd or direct) scanning and reclaiming pages from all memcgs
> > exist in this system, because currently the reclaimer will fairly reclaim
> > pages from all memcgs if the system is under memory pressure.
> > The possible method to drop these file page caches is setting the
> > hard limit of this memcg to 0. Unfortunately this may invoke the OOM killer
> > and generates lots of outputs, that should not happen.
> > The OOM output is not expected by the admin if he or she wants to drop
> > the cahes and knows there're no processes in this memcg.
> >
> > If memcg is not populated, we should not invoke the OOM killer because
> > there's nothing to kill. Next time when you start a new process and if the
> > max is still bellow usage, the OOM killer will be invoked and your new
> > process is killed, so we can cosider it as lazy OOM, that is we have been
> > always doing in the kernel.
> >
> > Fixes: b6e6edcf ("mm: memcontrol: reclaim and OOM kill when shrinking memory.max below usage")
> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > Cc: Johannes Weiner <hannes@cmpxchg.org>
> > Cc: Michal Hocko <mhocko@suse.com>
>
> due to reasons explained repeatedly
> Nacked-by: Michal Hocko <mhocko@suse.com>
>
> And I really find it highly annoying that you keep ignoring the review
> feedback.

I didn't ignore your feedback, pls. read my reply and commit log seriously.
The reason I didn't accept your freeback is that your freeback is
based on your wrong knowladge.

Thanks

Yafang


  reply	other threads:[~2019-11-27  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  1:28 [PATCH v2] mm, memcg: avoid oom if cgroup is not populated Yafang Shao
2019-11-27  8:54 ` Michal Hocko
2019-11-27  9:17   ` Yafang Shao [this message]
2019-11-27  9:33     ` Yafang Shao
2019-11-27 11:11 ` David Hildenbrand
2019-11-27 11:35   ` Yafang Shao
2019-11-27 11:58     ` Michal Hocko
2019-11-27 12:01       ` Yafang Shao
2019-11-27 11:41   ` Michal Hocko
2019-11-27 11:55     ` Yafang Shao
2019-11-27 11:57     ` David Hildenbrand

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=CALOAHbAviqC1q11z8rh5F1gNJw2EmZUMBV-CkZ7wKvAAwfeccQ@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@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;
as well as URLs for NNTP newsgroup(s).