From: Johannes Weiner <hannes@cmpxchg.org>
To: David Rientjes <rientjes@google.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Stalled MM patches for review
Date: Tue, 16 Dec 2014 21:13:02 -0500 [thread overview]
Message-ID: <20141217021302.GA14148@phnom.home.cmpxchg.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1412161650540.19867@chino.kir.corp.google.com>
On Tue, Dec 16, 2014 at 05:07:16PM -0800, David Rientjes wrote:
> On Mon, 15 Dec 2014, Johannes Weiner wrote:
> > /* Check if we should retry the allocation */
> > pages_reclaimed += did_some_progress;
> > if (should_alloc_retry(gfp_mask, order, did_some_progress,
> > pages_reclaimed)) {
> > + /*
> > + * If we fail to make progress by freeing individual
> > + * pages, but the allocation wants us to keep going,
> > + * start OOM killing tasks.
> > + */
> > + if (!did_some_progress) {
> > + page = __alloc_pages_may_oom(gfp_mask, order, zonelist,
> > + high_zoneidx, nodemask,
> > + preferred_zone, classzone_idx,
> > + migratetype,&did_some_progress);
>
> Missing a space.
That was because of the 80 character limit, it seemed preferrable over
a linewrap.
> > + if (page)
> > + goto got_pg;
> > + if (!did_some_progress)
> > + goto nopage;
> > + }
> > /* Wait for some write requests to complete then retry */
> > wait_iff_congested(preferred_zone, BLK_RW_ASYNC, HZ/50);
> > goto rebalance;
>
> This is broken because it does not recall gfp_to_alloc_flags(). If
> current is the oom kill victim, then ALLOC_NO_WATERMARKS never gets set
> properly and the slowpath will end up looping forever. The "restart"
> label which was removed in this patch needs to be reintroduced, and it can
> probably be moved to directly before gfp_to_alloc_flags().
Thanks for catching this. gfp_to_alloc_flags()'s name doesn't exactly
imply such side effects... Here is a fixlet on top:
---
next prev parent reply other threads:[~2014-12-17 2:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 23:02 Andrew Morton
2014-12-15 23:56 ` Yasuaki Ishimatsu
2014-12-16 3:06 ` Johannes Weiner
2014-12-17 1:07 ` David Rientjes
2014-12-17 2:13 ` Johannes Weiner [this message]
2014-12-17 15:51 ` Michal Hocko
2014-12-17 22:28 ` David Rientjes
2014-12-18 2:20 ` Johannes Weiner
2014-12-18 16: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=20141217021302.GA14148@phnom.home.cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--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