From: Yinghai Lu <yinghai@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: mingo@redhat.com, rientjes@google.com, tglx@linutronix.de,
hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET tip] x86, NUMA: Unify 32 and 64bit NUMA initialization
Date: Fri, 29 Apr 2011 13:14:14 -0700 [thread overview]
Message-ID: <4DBB1C16.3070307@kernel.org> (raw)
In-Reply-To: <1304090924-8197-1-git-send-email-tj@kernel.org>
On 04/29/2011 08:28 AM, Tejun Heo wrote:
> Hello,
>
> This patchset, finally, unifies 32 and 64bit NUMA initialization. It
> gradually moves 64bit stuff to common code and replaces 32bit code
> with it. Once the unification is complete, amdtopology and emulation
> are enabled for 32bit too (there's no reason not to).
got:
SRAT: Node 0 PXM 0 0-a0000
SRAT: Node 0 PXM 0 100000-80000000
SRAT: Node 0 PXM 0 100000000-880000000
SRAT: Node 1 PXM 1 880000000-1080000000
SRAT: Node 2 PXM 2 1080000000-1880000000
SRAT: Node 3 PXM 3 1880000000-2080000000
SRAT: Node 4 PXM 4 2080000000-2880000000
SRAT: Node 5 PXM 5 2880000000-3080000000
SRAT: Node 6 PXM 6 3080000000-3880000000
SRAT: Node 7 PXM 7 3880000000-4080000000
NUMA: Initialized distance table, cnt=8
NUMA: Node 0 [0,a0000) + [100000,80000000) -> [0,80000000)
NUMA: Node 0 [0,80000000) + [100000000,880000000) -> [0,880000000)
Adding active range (0, 0x10, 0x95) 0 entries of 3200 used
Adding active range (0, 0x100, 0x7f750) 1 entries of 3200 used
Adding active range (0, 0x100000, 0x880000) 2 entries of 3200 used
Adding active range (1, 0x880000, 0x1000000) 3 entries of 3200 used
Adding active range (2, 0x1080000, 0x1000000) 4 entries of 3200 used
------------[ cut here ]------------
WARNING: at mm/sparse.c:170 mminit_validate_memmodel_limits+0x29/0x69()
Hardware name: Sun Fire X4800 M2
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.39-rc5-tip-03938-gda7ba4e-dirty #896
Call Trace:
[<40261c57>] warn_slowpath_common+0x65/0x7a
[<40e30020>] ? mminit_validate_memmodel_limits+0x29/0x69
[<40261c7b>] warn_slowpath_null+0xf/0x13
[<40e30020>] mminit_validate_memmodel_limits+0x29/0x69
[<40e10a2e>] add_active_range+0x34/0xdb
[<40e0c281>] memblock_x86_register_active_regions+0x92/0xb3
[<40e0a8c1>] numa_init+0xf1/0x5e9
[<408cad47>] ? printk+0xf/0x11
[<40e0af98>] x86_numa_init+0x16/0x34
[<40e0b2dd>] initmem_init+0x8/0xbc
[<40dfc3ce>] setup_arch+0xa27/0xad7
[<40df85cb>] start_kernel+0x71/0x2ed
[<40df80c4>] i386_start_kernel+0xc4/0xcb
---[ end trace 4eaa2a86a8e2da22 ]---
Adding active range (3, 0x1880000, 0x1000000) 5 entries of 3200 used
Adding active range (4, 0x2080000, 0x1000000) 6 entries of 3200 used
Adding active range (5, 0x2880000, 0x1000000) 7 entries of 3200 used
Adding active range (6, 0x3080000, 0x1000000) 8 entries of 3200 used
Adding active range (7, 0x3880000, 0x1000000) 9 entries of 3200 used
NUMA: nodes only cover 0MB of your 63478MB e820 RAM. Not used.
No NUMA configuration found
Faking a node at 0000000000000000-0000001000000000
Adding active range (0, 0x10, 0x95) 0 entries of 3200 used
Adding active range (0, 0x100, 0x7f750) 1 entries of 3200 used
Adding active range (0, 0x100000, 0x1000000) 2 entries of 3200 used
node 0 pfn: [0 - 1000000]
remap_alloc: node 0 [fffe00000-1000000000) -> [bde00000-be000000)
Initmem setup node 0 [0000000000000000-0000000fffffffff]
NODE_DATA [#000000007de00000 - 0x0000007de02fff] (remapped)
62606MB HIGHMEM available.
2929MB LOWMEM available.
max_low_pfn = b71fe, highstart_pfn = b71fe
need following patch.
Thanks
Yinghai
[PATCH] x86, numa: Trim numa meminfo correctly
During testing 32bit numa unifying code from tj, found one system with more than 64g
fail to use numa.
It turn out we do not trim that numa meminfo correctly with max_pfn.
start could be bigger than 64g too.
Also need to make the checking in seperated loop.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/mm/numa.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Index: linux-2.6/arch/x86/mm/numa.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/numa.c
+++ linux-2.6/arch/x86/mm/numa.c
@@ -272,6 +272,7 @@ int __init numa_cleanup_meminfo(struct n
const u64 high = PFN_PHYS(max_pfn);
int i, j, k;
+ /* trim all entries at first */
for (i = 0; i < mi->nr_blks; i++) {
struct numa_memblk *bi = &mi->blk[i];
@@ -280,10 +281,12 @@ int __init numa_cleanup_meminfo(struct n
bi->end = min(bi->end, high);
/* and there's no empty block */
- if (bi->start == bi->end) {
+ if (bi->start >= bi->end)
numa_remove_memblk_from(i--, mi);
- continue;
- }
+ }
+
+ for (i = 0; i < mi->nr_blks; i++) {
+ struct numa_memblk *bi = &mi->blk[i];
for (j = i + 1; j < mi->nr_blks; j++) {
struct numa_memblk *bj = &mi->blk[j];
@@ -313,8 +316,8 @@ int __init numa_cleanup_meminfo(struct n
*/
if (bi->nid != bj->nid)
continue;
- start = max(min(bi->start, bj->start), low);
- end = min(max(bi->end, bj->end), high);
+ start = min(bi->start, bj->start);
+ end = max(bi->end, bj->end);
for (k = 0; k < mi->nr_blks; k++) {
struct numa_memblk *bk = &mi->blk[k];
next prev parent reply other threads:[~2011-04-29 20:14 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 15:28 [PATCHSET tip] x86, NUMA: Unify 32 and 64bit NUMA initialization Tejun Heo
2011-04-29 15:28 ` [PATCH 01/25] x86-64, NUMA: Simplify hotadd memory handling Tejun Heo
2011-04-29 15:28 ` [PATCH 02/25] x86-64, NUMA: trivial cleanups for setup_node_bootmem() Tejun Heo
2011-04-29 15:28 ` [PATCH 03/25] x86-64, NUMA: simplify nodedata allocation Tejun Heo
2011-04-29 17:23 ` Yinghai Lu
2011-04-30 12:02 ` Tejun Heo
2011-04-29 15:28 ` [PATCH 04/25] x86-32, NUMA: Automatically set apicid -> node in setup_local_APIC() Tejun Heo
2011-04-29 15:28 ` [PATCH 05/25] x86, NUMA: Unify 32/64bit numa_cpu_node() implementation Tejun Heo
2011-04-29 15:28 ` [PATCH 06/25] x86-32, NUMA: Make apic->x86_32_numa_cpu_node() optional Tejun Heo
2011-04-29 15:28 ` [PATCH 07/25] x86-32, NUMA: use sparse_memory_present_with_active_regions() Tejun Heo
2011-04-29 15:28 ` [PATCH 08/25] x86, NUMA: trivial cleanups Tejun Heo
2011-04-29 17:25 ` Yinghai Lu
2011-04-30 12:03 ` Tejun Heo
2011-04-30 16:24 ` Yinghai Lu
2011-04-30 18:00 ` Tejun Heo
2011-04-30 23:10 ` Yinghai Lu
2011-04-30 23:11 ` [PATCH] x86, numa: Rename setup_node_bootmem to setup_node_data Yinghai Lu
2011-04-29 15:28 ` [PATCH 09/25] x86, NUMA: rename srat_64.c to srat.c Tejun Heo
2011-04-29 15:28 ` [PATCH 10/25] x86, NUMA: make srat.c 32bit safe Tejun Heo
2011-04-29 15:28 ` [PATCH 11/25] x86-32, NUMA: Move get_memcfg_numa() into numa_32.c Tejun Heo
2011-04-29 15:28 ` [PATCH 12/25] x86, NUMA: Move numa_nodes_parsed to numa.[hc] Tejun Heo
2011-04-29 15:28 ` [PATCH 13/25] x86-32, NUMA: implement temporary NUMA init shims Tejun Heo
2011-04-29 15:28 ` [PATCH 14/25] x86-32, NUMA: Replace srat_32.c with srat.c Tejun Heo
2011-04-29 15:28 ` [PATCH 15/25] x86-32, NUMA: Update numaq to use new NUMA init protocol Tejun Heo
2011-04-29 15:28 ` [PATCH 16/25] x86, NUMA: Move NUMA init logic from numa_64.c to numa.c Tejun Heo
2011-04-29 15:28 ` [PATCH 17/25] x86, NUMA: Enable build of generic NUMA init code on 32bit Tejun Heo
2011-04-29 15:28 ` [PATCH 18/25] x86, NUMA: Remove long 64bit assumption from numa.c Tejun Heo
2011-04-29 15:28 ` [PATCH 19/25] x86-32, NUMA: Add @start and @end to init_alloc_remap() Tejun Heo
2011-04-29 15:28 ` [PATCH 20/25] x86, NUMA: Initialize and use remap allocator from setup_node_bootmem() Tejun Heo
2011-04-29 15:28 ` [PATCH 21/25] x86, NUMA: Make 32bit use common NUMA init path Tejun Heo
2011-04-29 15:28 ` [PATCH 22/25] x86, NUMA: Make numa_init_array() static Tejun Heo
2011-04-29 15:28 ` [PATCH 23/25] x86, NUMA: Rename amdtopology_64.c to amdtopology.c Tejun Heo
2011-04-29 15:28 ` [PATCH 24/25] x86, NUMA: Enable CONFIG_AMD_NUMA on 32bit too Tejun Heo
2011-04-29 15:28 ` [PATCH 25/25] x86, NUMA: Enable emulation " Tejun Heo
2011-04-29 18:15 ` [PATCHSET tip] x86, NUMA: Unify 32 and 64bit NUMA initialization Ingo Molnar
2011-04-29 20:14 ` Yinghai Lu [this message]
2011-04-30 12:17 ` Tejun Heo
2011-04-30 12:33 ` [PATCH] x86, NUMA: Fix empty memblk detection in numa_cleanup_meminfo() Tejun Heo
2011-04-30 12:35 ` Tejun Heo
2011-05-01 0:43 ` Yinghai Lu
2011-05-01 10:20 ` Tejun Heo
2011-05-01 19:44 ` [PATCH] x86, numa: Trim numa meminfo with max_pfn in separated loop Yinghai Lu
2011-04-30 16:31 ` [PATCHSET tip] x86, NUMA: Unify 32 and 64bit NUMA initialization 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=4DBB1C16.3070307@kernel.org \
--to=yinghai@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox