From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
rientjes@google.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm,oom: do not loop !__GFP_FS allocation if the OOM killer is disabled.
Date: Mon, 11 Jan 2016 12:43:29 -0500 [thread overview]
Message-ID: <20160111174329.GA377@cmpxchg.org> (raw)
In-Reply-To: <20160111172058.GK27317@dhcp22.suse.cz>
On Mon, Jan 11, 2016 at 06:20:58PM +0100, Michal Hocko wrote:
> On Mon 11-01-16 12:00:47, Johannes Weiner wrote:
> > On Mon, Jan 11, 2016 at 02:07:16PM +0900, Tetsuo Handa wrote:
> > > After the OOM killer is disabled during suspend operation,
> > > any !__GFP_NOFAIL && __GFP_FS allocations are forced to fail.
> > > Thus, any !__GFP_NOFAIL && !__GFP_FS allocations should be
> > > forced to fail as well.
> > >
> > > Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> >
> > Why? We had to acknowledge that !__GFP_FS allocations can not fail
> > even when they can't invoke the OOM killer. They are NOFAIL. Just like
> > an explicit __GFP_NOFAIL they should trigger a warning when they occur
> > after the OOM killer has been disabled and then keep looping.
>
> They are more like GFP_KERNEL than GFP_NOFAIL IMO because unlike
> GFP_NOFAIL they are already allowed to fail due to fatal_signals_pending
> and this has been the case for a really long time. Even semantically
> they are basically GFP_KERNEL with FS recursion protection in majority
> cases. And I believe that we should allow them to fail long term after
> some FS (btrfs at least) catch up and start handling failures properly.
I see, yeah that's probably a better way to look at it.
Thanks!
Scratch my objection to this patch then. But please do add to/update
that XXX comment above that line, or it'll be confusing. Hm?
/*
* XXX: Page reclaim didn't yield anything,
* and the OOM killer can't be invoked, but
* keep looping as per tradition. Unless the
* system is trying to enter a quiescent state
* during suspend and the OOM killer has been
* shut off already. Give up like with other
* !__GFP_NOFAIL allocations in that case.
*/
*did_some_progress = !oom_killer_disabled;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-01-11 17:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 5:07 [PATCH] mm,oom: do not loop !__GFP_FS allocation if the OOM killer is disabled Tetsuo Handa
2016-01-11 15:45 ` Michal Hocko
2016-01-11 17:00 ` Johannes Weiner
2016-01-11 17:20 ` Michal Hocko
2016-01-11 17:43 ` Johannes Weiner [this message]
2016-01-11 17:49 ` Michal Hocko
2016-01-11 21:30 ` Tetsuo Handa
2016-01-11 22:02 ` Johannes Weiner
2016-01-12 8:17 ` Michal Hocko
2016-01-19 23:22 ` David Rientjes
-- strict thread matches above, loose matches on Subject: below --
2016-01-23 15:38 Tetsuo Handa
2016-01-25 14:55 ` 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=20160111174329.GA377@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--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).