HUGETLB pages on multiple nodes

From: Nick Pollitt <npollitt_at_sgi.com>
Date: 2003-07-15 05:20:37
Seth,  It looks like at boot time all the hugepages will get allocated 
on the boot node.  We'd like to spread the pages across multiple nodes 
on NUMA systems.  Here's a simple patch to round-robin the pages during 
kernel init.  Comments?

Nick

===== arch/ia64/mm/hugetlbpage.c 1.2 vs edited =====
--- 1.2/arch/ia64/mm/hugetlbpage.c	Mon May 19 09:18:44 2003
+++ edited/arch/ia64/mm/hugetlbpage.c	Thu Jul 10 11:35:05 2003
@@ -419,7 +419,12 @@
 	struct page *page;
 
 	for (i = 0; i < htlbpage_max; ++i) {
+#ifdef CONFIG_NUMA
+		int node = i % num_memblks;
+		page = alloc_pages_node(node, __GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
+#else
 		page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
+#endif /* CONFIG_NUMA */
 		if (!page)
 			break;
 		for (j = 0; j < HPAGE_SIZE/PAGE_SIZE; ++j)

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Jul 14 15:25:23 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:16 EST