linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>
Subject: [PATCH 2/4] mm, page_alloc: inline the fast path of the zonelist iterator -fix
Date: Wed, 27 Apr 2016 13:24:43 +0100	[thread overview]
Message-ID: <1461759885-17163-3-git-send-email-mgorman@techsingularity.net> (raw)
In-Reply-To: <1461759885-17163-1-git-send-email-mgorman@techsingularity.net>

Vlastimil Babka pointed out that the nodes allowed by a cpuset are not
reread if the nodemask changes during an allocation. This potentially
allows an unnecessary page allocation failure. Moving the retry_cpuset
label is insufficient but rereading the nodemask before retrying addresses
the problem.

This is a fix to the mmotm patch
mm-page_alloc-inline-the-fast-path-of-the-zonelist-iterator.patch .

Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/page_alloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d8383750bd43..45a36e98b9cb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3855,6 +3855,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
 	 */
 	if (unlikely(!page && read_mems_allowed_retry(cpuset_mems_cookie))) {
 		alloc_mask = gfp_mask;
+		ac.nodemask = &cpuset_current_mems_allowed;
 		goto retry_cpuset;
 	}
 
-- 
2.6.4

--
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>

  parent reply	other threads:[~2016-04-27 12:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 12:24 [PATCH 0/4] Optimise page alloc/free fast paths followup v1 Mel Gorman
2016-04-27 12:24 ` [PATCH 1/4] mm, page_alloc: Only check PageCompound for high-order pages -fix Mel Gorman
2016-04-27 12:24 ` Mel Gorman [this message]
2016-04-27 12:30   ` [PATCH 2/4] mm, page_alloc: inline the fast path of the zonelist iterator -fix Mel Gorman
2016-04-27 12:24 ` [PATCH 3/4] mm, page_alloc: move might_sleep_if check to the allocator slowpath -revert Mel Gorman
2016-04-27 12:24 ` [PATCH 4/4] mm, page_alloc: Check once if a zone has isolated pageblocks -fix Mel Gorman

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=1461759885-17163-3-git-send-email-mgorman@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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