From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Ganapatrao Kulkarni <gpkulkarni@gmail.com>,
linux-mm@kvack.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mel Gorman <mgorman@techsingularity.net>
Subject: Re: getting oom/stalls for ltp test cpuset01 with latest/4.9 kernel
Date: Fri, 13 Jan 2017 16:51:42 +0100 [thread overview]
Message-ID: <20170113155142.GO25212@dhcp22.suse.cz> (raw)
In-Reply-To: <89fec1bd-52b7-7861-2e02-a719c5631610@suse.cz>
On Fri 13-01-17 10:06:14, Vlastimil Babka wrote:
[...]
> >From 9f041839401681f2678edf5040c851d11963c5fe Mon Sep 17 00:00:00 2001
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Fri, 13 Jan 2017 10:01:26 +0100
> Subject: [PATCH] mm, page_alloc: fix race with cpuset update or removal
>
> Changelog and S-O-B TBD.
> ---
> mm/page_alloc.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6de9440e3ae2..c397f146843a 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3775,9 +3775,17 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
> /*
> * Restore the original nodemask if it was potentially replaced with
> * &cpuset_current_mems_allowed to optimize the fast-path attempt.
> + * Also recalculate the starting point for the zonelist iterator or
> + * we could end up iterating over non-eligible zones endlessly.
> */
> - if (cpusets_enabled())
> + if (unlikely(ac.nodemask != nodemask)) {
> ac.nodemask = nodemask;
> + ac.preferred_zoneref = first_zones_zonelist(ac.zonelist,
> + ac.high_zoneidx, ac.nodemask);
> + if (!ac.preferred_zoneref)
> + goto no_zone;
> + }
> +
> page = __alloc_pages_slowpath(alloc_mask, order, &ac);
I think you nailed it. It is really possible that preferred_zoneref is
outside of the cpuset_current_mems_allowed and if we are unlucky there
won't be any other zones on the zonelist...
--
Michal Hocko
SUSE Labs
--
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:[~2017-01-13 15:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 10:50 getting oom/stalls for ltp test cpuset01 with latest/4.9 kernel Ganapatrao Kulkarni
2017-01-11 11:05 ` Vlastimil Babka
2017-01-11 12:38 ` Vlastimil Babka
2017-01-11 16:22 ` Ganapatrao Kulkarni
2017-01-11 16:46 ` Michal Hocko
2017-01-12 11:10 ` Vlastimil Babka
2017-01-13 4:35 ` Ganapatrao Kulkarni
2017-01-13 9:06 ` Vlastimil Babka
2017-01-13 15:51 ` Michal Hocko [this message]
2017-01-16 10:41 ` Ganapatrao Kulkarni
2017-01-16 13:22 ` Vlastimil Babka
2017-01-17 8:13 ` Vlastimil Babka
2017-01-11 16:33 ` Michal Hocko
2017-01-11 16:32 ` 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=20170113155142.GO25212@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=gpkulkarni@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=vbabka@suse.cz \
/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).