All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Pollitt <npollitt@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: HUGETLB pages on multiple nodes
Date: Mon, 14 Jul 2003 19:20:37 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105821072317881@msgid-missing> (raw)

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)


             reply	other threads:[~2003-07-14 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14 19:20 Nick Pollitt [this message]
2003-07-14 19:40 ` HUGETLB pages on multiple nodes William Lee Irwin III
2003-07-17 15:20 ` Christoph Hellwig

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=marc-linux-ia64-105821072317881@msgid-missing \
    --to=npollitt@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.