LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
"\\\"Rafael J. Wysocki\\\"" <rjw@rjwysocki.net>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -v2] mm, oom: do not fail __GFP_NOFAIL allocation if oom killer is disbaled
Date: Wed, 25 Feb 2015 12:41:07 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.10.1502251240150.18097@chino.kir.corp.google.com> (raw)
In-Reply-To: <20150225140826.GD26680@dhcp22.suse.cz>
On Wed, 25 Feb 2015, Michal Hocko wrote:
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d224bbdf8e8..c2ff40a30003 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2363,7 +2363,8 @@ __alloc_pages_may_oom(gfp_t gfp_mask, unsigned int order,
> goto out;
> }
> /* Exhausted what can be done so it's blamo time */
> - if (out_of_memory(ac->zonelist, gfp_mask, order, ac->nodemask, false))
> + if (out_of_memory(ac->zonelist, gfp_mask, order, ac->nodemask, false)
> + || WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL))
> *did_some_progress = 1;
> out:
> oom_zonelist_unlock(ac->zonelist, gfp_mask);
Eek, not sure we actually need to play any games with did_some_progress,
it might be clearer just to do this
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2760,7 +2760,7 @@ retry:
&did_some_progress);
if (page)
goto got_pg;
- if (!did_some_progress)
+ if (!did_some_progress && !(gfp_mask & __GFP_NOFAIL))
goto nopage;
}
/* Wait for some write requests to complete then retry */
Either way you decide, feel free to add my
Acked-by: David Rientjes <rientjes@gooogle.com>
next prev parent reply other threads:[~2015-02-25 20:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 18:19 [PATCH] " Michal Hocko
2015-02-24 18:22 ` Michal Hocko
2015-02-24 19:11 ` Johannes Weiner
2015-02-24 20:23 ` David Rientjes
2015-02-25 14:08 ` [PATCH -v2] " Michal Hocko
2015-02-25 20:41 ` David Rientjes [this message]
2015-02-26 17:34 ` Michal Hocko
2015-02-24 22:09 ` [PATCH] " Konstantin Khlebnikov
2015-02-24 22:16 ` Konstantin Khlebnikov
2015-02-25 14:02 ` 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.10.1502251240150.18097@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rjw@rjwysocki.net \
--subject='Re: [PATCH -v2] mm, oom: do not fail __GFP_NOFAIL allocation if oom killer is disbaled' \
/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).