From: Lin Feng <linfeng@cn.fujitsu.com>
To: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
akpm@linux-foundation.org, linux-mm@kvack.org, x86@kernel.org,
linux-kernel@vger.kernel.org, yinghai@kernel.org,
wency@cn.fujitsu.com, tangchen@cn.fujitsu.com
Subject: Re: [PATCH] x86: numa: mm: kill double initialization for NODE_DATA
Date: Wed, 03 Apr 2013 09:54:33 +0800 [thread overview]
Message-ID: <515B8BD9.7060308@cn.fujitsu.com> (raw)
In-Reply-To: <20130402105709.GA10095@hacker.(null)>
Hi Wanpeng,
On 04/02/2013 06:57 PM, Wanpeng Li wrote:
>> >PS. For clarifying calling chains are showed as follows:
>> >setup_arch()
>> > ...
>> > initmem_init()
>> > x86_numa_init()
>> > numa_init()
>> > numa_register_memblks()
>> > setup_node_data()
>> > NODE_DATA(nid)->node_id = nid;
>> > NODE_DATA(nid)->node_start_pfn = start >> PAGE_SHIFT;
>> > NODE_DATA(nid)->node_spanned_pages = (end - start) >> PAGE_SHIFT;
>> > ...
>> > x86_init.paging.pagetable_init()
>> > paging_init()
>> > ...
>> > sparse_init()
>> > sparse_early_usemaps_alloc_node()
>> > sparse_early_usemaps_alloc_pgdat_section()
>> > ___alloc_bootmem_node_nopanic()
>> > __alloc_memory_core_early(pgdat->node_id,...)
>> > ...
>> > zone_sizes_init()
>> > free_area_init_nodes()
>> > free_area_init_node()
>> > pgdat->node_id = nid;
>> > pgdat->node_start_pfn = node_start_pfn;
>> > calculate_node_totalpages();
>> > pgdat->node_spanned_pages = totalpages;
>> >
> You miss the nodes which could become online at some point, but not
> online currently.
Sorry, I'm not quite understanding what you said.
I keep node_set_online(nid) there. In boot phase if a node is online now it wil be
reinitialized later by zone_sizes_init() else if a node is hotpluged after system is
up it will also be initialized by hotadd_new_pgdat() which falls into calling
free_area_init_node().
Besides this I'm not sure there are any other dependency besides what you worry about,
while I tested this on a x86_64 numa system with hot-add nodes and the meminfo statics
looks right before and after hot-add memory.
thanks for your patient,
linfeng
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-04-03 1:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 10:14 Lin Feng
2013-04-02 10:57 ` Wanpeng Li
2013-04-02 10:57 ` Wanpeng Li
2013-04-03 1:54 ` Lin Feng [this message]
2013-04-07 1:17 ` Wanpeng Li
2013-04-07 1:17 ` Wanpeng Li
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=515B8BD9.7060308@cn.fujitsu.com \
--to=linfeng@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=mingo@redhat.com \
--cc=tangchen@cn.fujitsu.com \
--cc=tglx@linutronix.de \
--cc=wency@cn.fujitsu.com \
--cc=x86@kernel.org \
--cc=yinghai@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