public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Christoph Lameter <clameter@sgi.com>,
	Anton Blanchard <anton@samba.org>,
	akpm@osdl.org, linuxppc-dev@ozlabs.org,
	linux-kernel@vger.kernel.org, Mel Gorman <mel@csn.ul.ie>,
	Mike Kravetz <kravetz@us.ibm.com>,
	Andy Whitcroft <apw@shadowen.org>
Subject: [PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc
Date: Fri, 20 Oct 2006 15:31:11 +0100	[thread overview]
Message-ID: <8a76dfd735e544016c5f04c98617b87d@pinky> (raw)
In-Reply-To: 4538DACC.5050605@shadowen.org

Reintroduce NODES_SPAN_OTHER_NODES for powerpc

Revert "[PATCH] Remove SPAN_OTHER_NODES config definition"
    This reverts commit f62859bb6871c5e4a8e591c60befc8caaf54db8c.
Revert "[PATCH] mm: remove arch independent NODES_SPAN_OTHER_NODES"
    This reverts commit a94b3ab7eab4edcc9b2cb474b188f774c331adf7.

Also update the comments to indicate that this is still required
and where its used.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8b69104..2bd9b7f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -751,6 +751,15 @@ config ARCH_MEMORY_PROBE
 	def_bool y
 	depends on MEMORY_HOTPLUG
 
+# Some NUMA nodes have memory ranges that span
+# other nodes.  Even though a pfn is valid and
+# between a node's start and end pfns, it may not
+# reside on that node.  See memmap_init_zone()
+# for details.
+config NODES_SPAN_OTHER_NODES
+	def_bool y
+	depends on NEED_MULTIPLE_NODES
+
 config PPC_64K_PAGES
 	bool "64k page size"
 	depends on PPC64
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 9828663..d2833c1 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
+CONFIG_NODES_SPAN_OTHER_NODES=y
 # CONFIG_PPC_64K_PAGES is not set
 CONFIG_SCHED_SMT=y
 CONFIG_PROC_DEVICETREE=y
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 59855b8..ed0762b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -674,6 +674,12 @@ #define sparse_init()	do {} while (0)
 #define sparse_index_init(_sec, _nid)  do {} while (0)
 #endif /* CONFIG_SPARSEMEM */
 
+#ifdef CONFIG_NODES_SPAN_OTHER_NODES
+#define early_pfn_in_nid(pfn, nid)	(early_pfn_to_nid(pfn) == (nid))
+#else
+#define early_pfn_in_nid(pfn, nid)	(1)
+#endif
+
 #ifndef early_pfn_valid
 #define early_pfn_valid(pfn)	(1)
 #endif
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 40db96a..57fa189 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1688,6 +1688,8 @@ void __meminit memmap_init_zone(unsigned
 	for (pfn = start_pfn; pfn < end_pfn; pfn++) {
 		if (!early_pfn_valid(pfn))
 			continue;
+		if (!early_pfn_in_nid(pfn, nid))
+			continue;
 		page = pfn_to_page(pfn);
 		set_page_links(page, zone, nid, pfn);
 		init_page_count(page);

  reply	other threads:[~2006-10-20 14:32 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 18:41 kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Will Schmidt
2006-10-13 19:05 ` Christoph Lameter
2006-10-13 19:53   ` Will Schmidt
2006-10-13 20:57     ` Will Schmidt
2006-10-13 21:22       ` Nathan Lynch
2006-10-13 21:34         ` Anton Blanchard
2006-10-13 22:01         ` Mike Kravetz
2006-10-13 22:22       ` Christoph Lameter
2006-10-16 16:00         ` Will Schmidt
2006-10-16 19:20         ` Will Schmidt
2006-10-16 19:25           ` Christoph Lameter
2006-10-16 20:50             ` Will Schmidt
2006-10-16 23:37               ` Christoph Lameter
2006-10-18  6:11                 ` Paul Mackerras
2006-10-18 15:12                   ` Christoph Lameter
2006-10-18 21:19                     ` Paul Mackerras
2006-10-18 21:26                       ` Christoph Lameter
2006-10-18 21:49                       ` Christoph Lameter
2006-10-19  5:03                         ` Paul Mackerras
2006-10-19 16:16                           ` Christoph Lameter
2006-10-19 16:30                             ` Anton Blanchard
2006-10-19 16:49                               ` Christoph Lameter
2006-10-19 22:23                                 ` Paul Mackerras
2006-10-19 22:31                                   ` Christoph Lameter
2006-10-20  7:18                                     ` Paul Mackerras
2006-10-20 14:18                                       ` Andy Whitcroft
2006-10-20 14:31                                         ` Andy Whitcroft [this message]
2006-10-20 16:30                                           ` [PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc Mel Gorman
2006-10-20 14:59                                         ` kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Mike Kravetz
2006-10-20 15:19                                         ` Will Schmidt
2006-10-20 16:00                                         ` Andy Whitcroft
2006-10-20 17:09                                           ` Andrew Morton
2006-10-20 17:46                                             ` Christoph Lameter
2006-10-20 18:07                                               ` Andy Whitcroft
2006-10-20 17:13                                           ` Will Schmidt
2006-10-20 17:34                                       ` Christoph Lameter
2006-10-20 22:54                                         ` Paul Mackerras
2006-10-19 17:03                               ` Christoph Lameter
2006-10-19 18:07                                 ` Christoph Lameter
2006-10-19 20:37                                 ` Will Schmidt
2006-10-19 21:28                                   ` Christoph Lameter
2006-10-19 21:43                                     ` Will Schmidt
2006-10-19 22:00                                       ` Christoph Lameter
2006-10-19 21:39                                   ` Christoph Lameter
2006-10-19 20:38                             ` Will Schmidt
2006-10-19 21:30                               ` Christoph Lameter
2006-10-18 16:06                   ` Christoph Lameter

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=8a76dfd735e544016c5f04c98617b87d@pinky \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=clameter@sgi.com \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mel@csn.ul.ie \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox