From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: don't reallocate pgt for node0
Date: Mon, 30 Jun 2008 18:34:58 -0700 [thread overview]
Message-ID: <200806301834.59156.yhlu.kernel@gmail.com> (raw)
kva ram already mapped right after away, so don't need to get that for low ram.
avoid wasting one copy pgdat.
also add node id in early_res name in case get it from find_e820_area.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
arch/x86/mm/discontig_32.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Index: linux-2.6/arch/x86/mm/discontig_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/discontig_32.c
+++ linux-2.6/arch/x86/mm/discontig_32.c
@@ -156,17 +156,20 @@ static void __init propagate_e820_map_no
*/
static void __init allocate_pgdat(int nid)
{
- if (nid && node_has_online_mem(nid) && node_remap_start_vaddr[nid])
+ char buf[16];
+
+ if (node_has_online_mem(nid) && node_remap_start_vaddr[nid])
NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
else {
unsigned long pgdat_phys;
pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
- (nid ? max_low_pfn:max_pfn_mapped)<<PAGE_SHIFT,
+ max_pfn_mapped<<PAGE_SHIFT,
sizeof(pg_data_t),
PAGE_SIZE);
NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
- reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),
- "NODE_DATA");
+ memset(buf, 0, sizeof(buf));
+ sprintf(buf, "NODE_DATA %d", nid);
+ reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), buf);
}
printk(KERN_DEBUG "allocate_pgdat: node %d NODE_DATA %08lx\n",
nid, (unsigned long)NODE_DATA(nid));
next reply other threads:[~2008-07-01 1:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 1:34 Yinghai Lu [this message]
2008-07-01 8:44 ` [PATCH] x86: don't reallocate pgt for node0 Ingo Molnar
2008-07-02 3:02 ` [PATCH] x86: change copy_e820_map to append_e820_map Yinghai Lu
2008-07-03 13:58 ` Ingo Molnar
2008-07-02 3:03 ` [PATCH] x86: make early_res_to_bootmem print out less 80 width chars Yinghai Lu
2008-07-03 13:58 ` Ingo Molnar
2008-07-02 3:04 ` [PATCH] x86: not printout if not finding setup_data Yinghai Lu
2008-07-03 13:55 ` Ingo Molnar
2008-07-02 7:31 ` [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit Yinghai Lu
2008-07-03 13:54 ` Ingo Molnar
2008-07-03 1:53 ` [PATCH] x86: move init_cpu_to_node after get_smp_config Yinghai Lu
2008-07-03 13:54 ` Ingo Molnar
[not found] ` <200807021851.02301.yinghai.lu@sun.com>
2008-07-03 1:54 ` [PATCH] x86: move prefill_possible_map calling early Yinghai Lu
2008-07-03 13:54 ` Ingo Molnar
2008-07-03 14:03 ` 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=200806301834.59156.yhlu.kernel@gmail.com \
--to=yhlu.kernel@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox