From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
yinghai@kernel.org, rja@sgi.com, tglx@linutronix.de,
rientjes@google.com, hpa@linux.intel.com
Subject: [tip:x86/urgent] x86, numa: For each node, register the memory blocks actually used
Date: Mon, 11 Oct 2010 22:01:26 GMT [thread overview]
Message-ID: <tip-e9aeb8fdb6b197b9b1e1c49717de892593bb811e@git.kernel.org> (raw)
In-Reply-To: <4CB27BDF.5000800@kernel.org>
Commit-ID: e9aeb8fdb6b197b9b1e1c49717de892593bb811e
Gitweb: http://git.kernel.org/tip/e9aeb8fdb6b197b9b1e1c49717de892593bb811e
Author: Yinghai Lu <yinghai@kernel.org>
AuthorDate: Sun, 10 Oct 2010 19:52:15 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 11 Oct 2010 13:46:34 -0700
x86, numa: For each node, register the memory blocks actually used
Russ reported SGI UV is broken recently. He said:
| The SRAT table shows that memory range is spread over two nodes.
|
| SRAT: Node 0 PXM 0 100000000-800000000
| SRAT: Node 1 PXM 1 800000000-1000000000
| SRAT: Node 0 PXM 0 1000000000-1080000000
|
|Previously, the kernel early_node_map[] would show three entries
|with the proper node.
|
|[ 0.000000] 0: 0x00100000 -> 0x00800000
|[ 0.000000] 1: 0x00800000 -> 0x01000000
|[ 0.000000] 0: 0x01000000 -> 0x01080000
|
|The problem is recent community kernel early_node_map[] shows
|only two entries with the node 0 entry overlapping the node 1
|entry.
|
| 0: 0x00100000 -> 0x01080000
| 1: 0x00800000 -> 0x01000000
After looking at the changelog, Found out that it has been broken for a while by
following commit
|commit 8716273caef7f55f39fe4fc6c69c5f9f197f41f1
|Author: David Rientjes <rientjes@google.com>
|Date: Fri Sep 25 15:20:04 2009 -0700
|
| x86: Export srat physical topology
Before that commit, register_active_regions() is called for every SRAT memory
entry right away.
Use nodememblk_range[] instead of nodes[] in order to make sure we
capture the actual memory blocks registered with each node. nodes[]
contains an extended range which spans all memory regions associated
with a node, but that does not mean that all the memory in between are
included.
Reported-by: Russ Anderson <rja@sgi.com>
Tested-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4CB27BDF.5000800@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: <stable@kernel.org> 2.6.33 .34 .35 .36
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/mm/srat_64.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index f9897f7..9c0d0d3 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -420,9 +420,11 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
return -1;
}
- for_each_node_mask(i, nodes_parsed)
- e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT,
- nodes[i].end >> PAGE_SHIFT);
+ for (i = 0; i < num_node_memblks; i++)
+ e820_register_active_regions(memblk_nodeid[i],
+ node_memblk_range[i].start >> PAGE_SHIFT,
+ node_memblk_range[i].end >> PAGE_SHIFT);
+
/* for out of order entries in SRAT */
sort_node_map();
if (!nodes_cover_memory(nodes)) {
next prev parent reply other threads:[~2010-10-11 22:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 21:34 [BUG] x86: bootmem broken on SGI UV Russ Anderson
2010-10-08 21:43 ` H. Peter Anvin
2010-10-08 22:15 ` Yinghai Lu
2010-10-08 22:57 ` Yinghai Lu
2010-10-09 12:59 ` Russ Anderson
2010-10-09 16:39 ` Robin Holt
2010-10-09 18:06 ` Yinghai Lu
2010-10-09 18:17 ` [PATCH -v2] x86, numa: Fix cross nodes memory configuration Yinghai Lu
2010-10-09 18:39 ` [BUG] x86: bootmem broken on SGI UV Linus Torvalds
2010-10-10 10:41 ` Ingo Molnar
2010-10-10 10:43 ` Ingo Molnar
2010-10-10 11:44 ` Robin Holt
2010-10-10 11:56 ` Robin Holt
2010-10-10 14:05 ` Ingo Molnar
2010-10-10 22:51 ` Robin Holt
2010-10-11 2:52 ` [PATCH -v3] x86, numa: Fix cross nodes memory configuration Yinghai Lu
2010-10-11 22:01 ` tip-bot for Yinghai Lu [this message]
2010-10-11 22:05 ` [tip:x86/urgent] x86, numa: For each node, register the memory blocks actually used David Rientjes
2010-10-11 22:21 ` H. Peter Anvin
2010-10-11 22:28 ` tip-bot for Yinghai Lu
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=tip-e9aeb8fdb6b197b9b1e1c49717de892593bb811e@git.kernel.org \
--to=yinghai@kernel.org \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=rja@sgi.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome