From: Vlastimil Babka <vbabka@suse.cz>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
David Rientjes <rientjes@google.com>,
Greg Thelen <gthelen@google.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>
Subject: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()
Date: Thu, 30 Jul 2015 18:34:31 +0200 [thread overview]
Message-ID: <1438274071-22551-3-git-send-email-vbabka@suse.cz> (raw)
In-Reply-To: <1438274071-22551-1-git-send-email-vbabka@suse.cz>
numa_mem_id() is able to handle allocation from CPUs on memory-less nodes,
so it's a more robust fallback than the currently used numa_node_id().
Suggested-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
---
include/linux/gfp.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 4a12cae2..f92cbd2 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -318,13 +318,14 @@ __alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order)
/*
* Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,
- * prefer the current CPU's node. Otherwise node must be valid and online.
+ * prefer the current CPU's closest node. Otherwise node must be valid and
+ * online.
*/
static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
unsigned int order)
{
if (nid == NUMA_NO_NODE)
- nid = numa_node_id();
+ nid = numa_mem_id();
return __alloc_pages_node(nid, gfp_mask, order);
}
--
2.4.6
next prev parent reply other threads:[~2015-07-30 16:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 16:34 [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Vlastimil Babka
2015-07-30 16:34 ` [PATCH v3 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node() Vlastimil Babka
2015-07-30 17:35 ` Johannes Weiner
2015-07-30 17:59 ` Christoph Lameter
2015-07-30 16:34 ` Vlastimil Babka [this message]
2015-07-30 17:41 ` [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node() Johannes Weiner
2015-08-06 7:00 ` Vlastimil Babka
2015-07-30 17:59 ` Christoph Lameter
2015-07-30 17:33 ` [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Johannes Weiner
2015-07-30 17:58 ` Christoph Lameter
2015-07-30 19:59 ` Vlastimil Babka
2015-07-30 20:07 ` Christoph Lameter
2015-07-31 21:25 ` David Rientjes
2015-07-31 21:45 ` Vlastimil Babka
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=1438274071-22551-3-git-send-email-vbabka@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cbe-oss-dev@lists.ozlabs.org \
--cc=cl@linux.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=kvm@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgorman@suse.de \
--cc=mgorman@techsingularity.net \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=penberg@kernel.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;
as well as URLs for NNTP newsgroup(s).