[RFC v2 3/4] mm: use numa_mem_id in alloc_pages_node()

From: Vlastimil Babka
Date: Fri Jul 24 2015 - 10:46:07 EST


numa_mem_id() is able to handle allocation from CPU's on memory-less nodes,
so it's a more robust fallback than the currently used numa_node_id().

Suggested-by: Christoph Lameter <cl@xxxxxxxxx>
Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
---
include/linux/gfp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 54c3ee7..531c72d 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -322,7 +322,7 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
{
/* Unknown node is current (or closest) node */
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/