From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Michal Hocko <mhocko@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>,
linux-mm@kvack.org, Greg Thelen <gthelen@google.com>,
David Rientjes <rientjes@google.com>,
syzbot <syzbot+bab151e82a4e973fa325@syzkaller.appspotmail.com>
Subject: Re: [PATCH] mm, oom: OOM victims do not need to select next OOM victim unless __GFP_NOFAIL.
Date: Wed, 29 Aug 2018 06:17:15 +0900 [thread overview]
Message-ID: <88703635-bd8a-41d5-ff57-ea865e2680e7@i-love.sakura.ne.jp> (raw)
In-Reply-To: <20180828135105.GB10349@dhcp22.suse.cz>
On 2018/08/28 22:51, Michal Hocko wrote:
> On Tue 28-08-18 22:29:56, Tetsuo Handa wrote:
> [...]
>> The OOM reaper may set MMF_OOM_SKIP without reclaiming any memory (due
>> to e.g. mlock()ed memory, shared memory, unable to grab mmap_sem for read).
>> We haven't reached to the point where the OOM reaper reclaims all memory
>> nor allocating threads wait some more after setting MMF_OOM_SKIP.
>> Therefore, this
>>
>> if (tsk_is_oom_victim(current) && !(oc->gfp_mask & __GFP_NOFAIL))
>> return true;
>>
>> is the simplest mitigation we can do now.
>
> But this is adding a mess because you pretend to make a forward progress
> even the OOM path didn't do anything at all and rely on another kludge
> elsewhere to work.
I'm not pretending to make a forward progress. If current thread is an OOM
victim, it is guaranteed to make forward progress (unless __GFP_NOFAIL) by
failing that allocation attempt after trying memory reserves. The OOM path
does not need to do anything at all.
prev parent reply other threads:[~2018-08-28 21:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 10:37 Tetsuo Handa
2018-08-20 10:53 ` Michal Hocko
2018-08-20 11:02 ` Tetsuo Handa
2018-08-20 11:10 ` Michal Hocko
2018-08-28 10:20 ` Tetsuo Handa
2018-08-28 10:59 ` Michal Hocko
2018-08-28 11:59 ` Johannes Weiner
2018-08-28 12:40 ` Johannes Weiner
2018-08-28 13:29 ` Tetsuo Handa
2018-08-28 13:51 ` Michal Hocko
2018-08-28 21:17 ` Tetsuo Handa [this message]
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=88703635-bd8a-41d5-ff57-ea865e2680e7@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=rientjes@google.com \
--cc=syzbot+bab151e82a4e973fa325@syzkaller.appspotmail.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