LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Andrea Arcangeli <aarcange@redhat.com>,
guro@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap
Date: Tue, 24 Apr 2018 13:22:45 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1804241317200.231037@chino.kir.corp.google.com> (raw)
In-Reply-To: <20180424201352.GV17484@dhcp22.suse.cz>
On Tue, 24 Apr 2018, Michal Hocko wrote:
> > I wanted to remove all per task checks because they are now irrelevant:
> > this would be the first dependency that exit_mmap() has on any
> > task_struct, which isn't intuitive -- we simply want to exit the mmap.
> > There's no requirement that current owns the mm other than this.
>
> There is no such requirement in the __oom_reap_task_mm. The given task
> is used for reporting purposes.
>
And tracing, which is pointless. And it unnecessarily spams the kernel
log for basic exiting.
> > I wanted
> > to avoid the implicit dependency on MMF_OOM_SKIP and make it explicit in
> > the exit path to be matched with the oom reaper.
>
> Well, I find it actually better that the code is not explicit about
> MMF_OOM_SKIP. The whole thing happens in the oom proper which should be
> really preferable. The whole synchronization is then completely
> transparent to the oom (including the oom lock etc).
>
It's already done in exit_mmap(). I'm not changing
> > I didn't want anything
> > additional printed to the kernel log about oom reaping unless the
> > oom_reaper actually needed to intervene, which is useful knowledge outside
> > of basic exiting.
>
> Can we shave all those parts as follow ups and make the fix as simple as
> possible?
>
It is as simple as possible. It is not doing any unnecessary locking or
checks that the exit path does not need to do for the sake of a smaller
patch. The number of changed lines in the patch is not what I'm
interested in, I am interested in something that is stable, something that
works, doesn't add additional (and unnecessary locking), and doesn't
change around what function sets what bit when called from what path.
> > My patch has passed intensive testing on both x86 and powerpc, so I'll ask
> > that it's pushed for 4.17-rc3. Many thanks to Tetsuo for the suggestion
> > on calling __oom_reap_task_mm() from exit_mmap().
>
> Yeah, but your patch does have a problem with blockable mmu notifiers
> IIUC.
What on earth are you talking about? exit_mmap() does
mmu_notifier_release(). There are no blockable mmu notifiers.
next prev parent reply other threads:[~2018-04-24 20:22 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 22:46 [patch] mm, oom: fix concurrent munlock and oom reaper unmap David Rientjes
2018-04-18 0:57 ` Tetsuo Handa
2018-04-18 2:39 ` David Rientjes
2018-04-18 2:52 ` [patch v2] " David Rientjes
2018-04-18 3:55 ` Tetsuo Handa
2018-04-18 4:11 ` David Rientjes
2018-04-18 4:47 ` Tetsuo Handa
2018-04-18 5:20 ` David Rientjes
2018-04-18 7:50 ` Michal Hocko
2018-04-18 11:49 ` Tetsuo Handa
2018-04-18 11:58 ` Michal Hocko
2018-04-18 13:25 ` Tetsuo Handa
2018-04-18 13:44 ` Michal Hocko
2018-04-18 14:28 ` Tetsuo Handa
2018-04-18 19:14 ` David Rientjes
2018-04-19 6:35 ` Michal Hocko
2018-04-19 10:45 ` Tetsuo Handa
2018-04-19 11:04 ` Michal Hocko
2018-04-19 11:51 ` Tetsuo Handa
2018-04-19 12:48 ` Michal Hocko
2018-04-19 19:14 ` David Rientjes
2018-04-19 19:34 ` David Rientjes
2018-04-19 22:13 ` Tetsuo Handa
2018-04-20 8:23 ` Michal Hocko
2018-04-20 12:40 ` Michal Hocko
2018-04-22 3:22 ` David Rientjes
2018-04-22 3:48 ` [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap Tetsuo Handa
2018-04-22 13:08 ` Michal Hocko
2018-04-24 2:31 ` David Rientjes
2018-04-24 5:11 ` Tetsuo Handa
2018-04-24 5:35 ` David Rientjes
2018-04-24 21:57 ` [patch v2] mm, oom: fix concurrent munlock and oom reaper unmap Tetsuo Handa
2018-04-24 22:25 ` David Rientjes
2018-04-24 22:34 ` [patch v3 for-4.17] " David Rientjes
2018-04-24 23:19 ` Michal Hocko
2018-04-24 13:04 ` [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap Michal Hocko
2018-04-24 20:01 ` David Rientjes
2018-04-24 20:13 ` Michal Hocko
2018-04-24 20:22 ` David Rientjes [this message]
2018-04-24 20:31 ` Michal Hocko
2018-04-24 21:07 ` David Rientjes
2018-04-24 23:08 ` Michal Hocko
2018-04-24 23:14 ` Michal Hocko
2018-04-22 3:45 ` [patch v2] mm, oom: fix concurrent munlock and oom reaper unmap David Rientjes
2018-04-22 13:18 ` Michal Hocko
2018-04-23 16:09 ` Michal Hocko
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.1804241317200.231037@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--subject='Re: [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap' \
/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
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).