[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1438274071-22551-3-git-send-email-vbabka@suse.cz>
Date: Thu, 30 Jul 2015 18:34:31 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Mel Gorman <mgorman@...e.de>,
David Rientjes <rientjes@...gle.com>,
Greg Thelen <gthelen@...gle.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Johannes Weiner <hannes@...xchg.org>,
linux-ia64@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
cbe-oss-dev@...ts.ozlabs.org, kvm@...r.kernel.org,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>
Subject: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()
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@...ux.com>
Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
Acked-by: David Rientjes <rientjes@...gle.com>
Acked-by: Mel Gorman <mgorman@...hsingularity.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists