From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: fix bootmem cross node for 32bit numa -v2
Date: Wed, 04 Mar 2009 12:21:24 -0800 [thread overview]
Message-ID: <49AEE2C4.2030602@kernel.org> (raw)
In-Reply-To: <20090304195814.GC21488@elte.hu>
Ingo Molnar wrote:
> * Yinghai Lu <yinghai@kernel.org> wrote:
>
>> Imapct: fix panic on system 2g x4 sockets
>>
>> Found one system with 4 sockets and every sockets has 2g can boot with numa32
>> because boot mem is crossing nodes.
>>
>> so try to have numa version setup_bootmem_allocator
>> v2: simplify the code
>
> i've already applied v1 - mind sending the simplification as a
> delta patch? Thanks.
>
please check
[PATCH] x86: fix bootmem cross node for 32bit numa - fixup
Imapct: clean up
simplify the code, reuse some lines.
remove min_low_pfn referring, it is always 0
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/mm/init_32.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -776,7 +776,6 @@ static void __init zone_sizes_init(void)
free_area_init_nodes(max_zone_pfns);
}
-#ifdef CONFIG_NEED_MULTIPLE_NODES
static unsigned long __init setup_node_bootmem(int nodeid,
unsigned long start_pfn,
unsigned long end_pfn,
@@ -802,7 +801,6 @@ static unsigned long __init setup_node_b
return bootmap + bootmap_size;
}
-#endif
void __init setup_bootmem_allocator(void)
{
@@ -812,8 +810,7 @@ void __init setup_bootmem_allocator(void
* Initialize the boot-time allocator (with low memory only):
*/
bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
- bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT,
- max_pfn_mapped<<PAGE_SHIFT, bootmap_size,
+ bootmap = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, bootmap_size,
PAGE_SIZE);
if (bootmap == -1L)
panic("Cannot find bootmem map of size %ld\n", bootmap_size);
@@ -821,21 +818,14 @@ void __init setup_bootmem_allocator(void
printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
max_pfn_mapped<<PAGE_SHIFT);
- printk(KERN_INFO " low ram: %08lx - %08lx\n",
- min_low_pfn<<PAGE_SHIFT, max_low_pfn<<PAGE_SHIFT);
+ printk(KERN_INFO " low ram: 0 - %08lx\n", max_low_pfn<<PAGE_SHIFT);
#ifdef CONFIG_NEED_MULTIPLE_NODES
for_each_online_node(nodeid)
bootmap = setup_node_bootmem(nodeid, node_start_pfn[nodeid],
node_end_pfn[nodeid], bootmap);
#else
- /* don't touch min_low_pfn */
- bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT,
- min_low_pfn, max_low_pfn);
- printk(KERN_INFO " bootmap %08lx - %08lx\n",
- bootmap, bootmap + bootmap_size);
- free_bootmem_with_active_regions(0, max_low_pfn);
- early_res_to_bootmem(0, max_low_pfn<<PAGE_SHIFT);
+ bootmap = setup_node_bootmem(0, 0, max_low_pfn, bootmap);
#endif
after_init_bootmem = 1;
next prev parent reply other threads:[~2009-03-04 20:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 9:22 [PATCH] x86: fix bootmem cross node for 32bit numa Yinghai Lu
2009-03-04 9:24 ` [PATCH] x86: make 32bit init_memory_mapping range change more like 64bit Yinghai Lu
2009-03-04 9:51 ` Pekka Enberg
2009-03-04 20:00 ` [tip:x86/mm] x86: make 32-bit init_memory_mapping range change more like 64-bit Yinghai Lu
2009-03-04 9:25 ` [PATCH] x86: ioremap mptable Yinghai Lu
2009-03-04 9:25 ` [PATCH] x86: reserve exact size of mptable Yinghai Lu
2009-03-04 19:51 ` Ingo Molnar
2009-03-04 20:01 ` [tip:x86/mm] " Yinghai Lu
2009-03-04 19:50 ` [PATCH] x86: ioremap mptable Ingo Molnar
2009-03-04 20:29 ` Yinghai Lu
2009-03-04 21:06 ` Ingo Molnar
2009-03-04 20:00 ` [tip:x86/mm] " Yinghai Lu
2009-03-04 18:08 ` [PATCH] x86: fix bootmem cross node for 32bit numa -v2 Yinghai Lu
2009-03-04 19:58 ` Ingo Molnar
2009-03-04 20:21 ` Yinghai Lu [this message]
2009-03-04 21:12 ` [tip:x86/mm] x86: fix bootmem cross node for 32bit numa, cleanup Yinghai Lu
2009-03-04 20:00 ` [tip:x86/mm] x86: fix bootmem cross node for 32bit numa Yinghai Lu
2009-03-08 23:16 ` Yinghai Lu
2009-03-09 6:58 ` Ingo Molnar
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=49AEE2C4.2030602@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 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.