From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch v4] mm, oom: fix unnecessary killing of additional processes
Date: Wed, 25 Jul 2018 07:31:24 +0900 [thread overview]
Message-ID: <05dbc69a-1c26-adec-15c6-f7192f8d2ae0@i-love.sakura.ne.jp> (raw)
In-Reply-To: <alpine.DEB.2.21.1807241444370.206335@chino.kir.corp.google.com>
On 2018/07/25 6:45, David Rientjes wrote:
> On Sat, 21 Jul 2018, Tetsuo Handa wrote:
>
>> You can't apply "[patch v4] mm, oom: fix unnecessary killing of additional processes"
>> because Michal's patch which removes oom_lock serialization was added to -mm tree.
>>
>
> I've rebased the patch to linux-next and posted a v5.
>
>> You might worry about situations where __oom_reap_task_mm() is a no-op.
>> But that is not always true. There is no point with emitting
>>
>> pr_info("oom_reaper: unable to reap pid:%d (%s)\n", ...);
>> debug_show_all_locks();
>>
>> noise and doing
>>
>> set_bit(MMF_OOM_SKIP, &mm->flags);
>>
>> because exit_mmap() will not release oom_lock until __oom_reap_task_mm()
>> completes. That is, except extra noise, there is no difference with
>> current behavior which sets set_bit(MMF_OOM_SKIP, &mm->flags) after
>> returning from __oom_reap_task_mm().
>>
>
> v5 has restructured how exit_mmap() serializes its unmapping with the oom
> reaper. It sets MMF_OOM_SKIP while holding mm->mmap_sem.
>
I think that v5 is still wrong. exit_mmap() keeps mmap_sem held for write does
not prevent oom_reap_task() from emitting the noise and setting MMF_OOM_SKIP
after timeout. Since your purpose is to wait for release of memory which could
not be reclaimed by __oom_reap_task_mm(), what if __oom_reap_task_mm() was no-op and
exit_mmap() was preempted immediately after returning from __oom_reap_task_mm() ?
Also, I believe that userspace visible knob is not needed.
next prev parent reply other threads:[~2018-07-24 22:31 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
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 [this message]
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=05dbc69a-1c26-adec-15c6-f7192f8d2ae0@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.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).