All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
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: Tue, 28 Aug 2018 12:59:08 +0200	[thread overview]
Message-ID: <20180828105908.GJ10223@dhcp22.suse.cz> (raw)
In-Reply-To: <8d6bed06-456c-eabc-d7be-413ac1e0e2f4@I-love.SAKURA.ne.jp>

On Tue 28-08-18 19:20:32, Tetsuo Handa wrote:
> On 2018/08/20 20:10, Michal Hocko wrote:
> > On Mon 20-08-18 20:02:30, Tetsuo Handa wrote:
> >> On 2018/08/20 19:53, Michal Hocko wrote:
> >>> On Mon 20-08-18 19:37:45, Tetsuo Handa wrote:
> >>>> Commit 696453e66630ad45 ("mm, oom: task_will_free_mem should skip
> >>>> oom_reaped tasks") changed to select next OOM victim as soon as
> >>>> MMF_OOM_SKIP is set. But since OOM victims can try ALLOC_OOM allocation
> >>>> and then give up (if !memcg OOM) or can use forced charge and then retry
> >>>> (if memcg OOM), OOM victims do not need to select next OOM victim unless
> >>>> they are doing __GFP_NOFAIL allocations.
> >>>
> >>> I do not like this at all. It seems hackish to say the least. And more
> >>> importantly...
> >>>
> >>>> This is a quick mitigation because syzbot is hitting WARN(1) caused by
> >>>> this race window [1]. More robust fix (e.g. make it possible to reclaim
> >>>> more memory before MMF_OOM_SKIP is set, wait for some more after
> >>>> MMF_OOM_SKIP is set) is a future work.
> >>>
> >>> .. there is already a patch (by Johannes) for that warning IIRC.
> >>
> >> You mean http://lkml.kernel.org/r/20180808144515.GA9276@cmpxchg.org ?
> > 
> > Yes
> > 
> >> But I can't find that patch in linux-next.git . And as far as I know,
> >> no patch was sent to linux.git for handling this problem. Therefore,
> >> I wrote this patch so that we can apply for 4.19-rc1.
> > 
> > I am pretty sure Johannes will post them later after merge window
> > closes.
> > 
> 
> But Johannes' patch will not prevent the OOM killer from needlessly selecting
> next OOM victim, will it? I still think we can apply my patch in order to prevent
> the OOM killer from needlessly selecting next OOM victim.

see my feedback on your patch.

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-08-28 10:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 10:37 [PATCH] mm, oom: OOM victims do not need to select next OOM victim unless __GFP_NOFAIL 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 [this message]
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

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=20180828105908.GJ10223@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.