From: David Rientjes <rientjes@google.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch v3] mm, oom: fix unnecessary killing of additional processes
Date: Fri, 20 Jul 2018 13:19:59 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1807201315580.231119@chino.kir.corp.google.com> (raw)
In-Reply-To: <9ab77cc7-2167-0659-a2ad-9cec3b9440e9@i-love.sakura.ne.jp>
On Fri, 20 Jul 2018, Tetsuo Handa wrote:
> > Absent oom_lock serialization, this is exactly working as intended. You
> > could argue that once the thread has reached exit_mmap() and begins oom
> > reaping that it should be allowed to finish before the oom reaper declares
> > MMF_OOM_SKIP. That could certainly be helpful, I simply haven't
> > encountered a usecase where it were needed. Or, we could restart the oom
> > expiration when MMF_UNSTABLE is set and deem that progress is being made
> > so it give it some extra time. In practice, again, we haven't seen this
> > needed. But either of those are very easy to add in as well. Which would
> > you prefer?
>
> I don't think we need to introduce user-visible knob interface (even if it is in
> debugfs), for I think that my approach can solve your problem. Please try OOM lockup
> (CVE-2016-10723) mitigation patch ( https://marc.info/?l=linux-mm&m=153112243424285&w=4 )
The issue I am fixing has nothing to do with contention on oom_lock, it
has to do with the inability of the oom reaper to free memory for one or
more of several reasons: mlock, blockable mmus, ptes, mm->mmap_sem
contention, and then the setting of MMF_OOM_SKIP to choose another victim
before the original victim even reaches exit_mmap(). Thus, removing
oom_lock from exit_mmap() will not fix this issue.
I agree that oom_lock can be removed from exit_mmap() and it would be
helpful to do so, and may address a series of problems that we have yet to
encounter, but this would not fix the almost immediate setting of
MMF_OOM_SKIP that occurs with minimal memory freeing due to the oom
reaper.
next prev parent reply other threads:[~2018-07-20 20:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 21:35 [patch v3] mm, oom: fix unnecessary killing of additional processes David Rientjes
2018-07-04 1:43 ` David Rientjes
2018-07-04 2:26 ` penguin-kernel
2018-07-05 23:46 ` Andrew Morton
2018-07-06 5:39 ` Michal Hocko
2018-07-07 0:05 ` David Rientjes
2018-07-09 12:35 ` Michal Hocko
2018-07-09 20:30 ` David Rientjes
2018-07-10 11:01 ` Michal Hocko
2018-07-17 21:09 ` Tetsuo Handa
2018-07-18 20:22 ` David Rientjes
2018-07-18 21:21 ` Tetsuo Handa
2018-07-19 14:23 ` Tetsuo Handa
2018-07-20 8:41 ` David Rientjes
2018-07-20 9:57 ` Tetsuo Handa
2018-07-20 20:19 ` David Rientjes [this message]
2018-07-20 20:47 ` Tetsuo Handa
2018-07-20 22:19 ` David Rientjes
2018-07-20 20:14 ` [patch v4] " David Rientjes
2018-07-20 20:43 ` Tetsuo Handa
2018-07-20 22:13 ` David Rientjes
2018-07-21 2:47 ` Tetsuo Handa
2018-07-24 21:45 ` David Rientjes
2018-07-24 22:31 ` Tetsuo Handa
2018-07-24 22:51 ` David Rientjes
2018-07-24 22:55 ` Tetsuo Handa
2018-07-25 0:24 ` David Rientjes
2018-07-24 21:44 ` [patch v5] " 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.21.1807201315580.231119@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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).