[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1359613162.1587.0.camel@kernel>
Date: Thu, 31 Jan 2013 00:19:22 -0600
From: Simon Jeons <simon.jeons@...il.com>
To: Tang Chen <tangchen@...fujitsu.com>
Cc: akpm@...ux-foundation.org, rientjes@...gle.com,
len.brown@...el.com, benh@...nel.crashing.org, paulus@...ba.org,
cl@...ux.com, minchan.kim@...il.com,
kosaki.motohiro@...fujitsu.com, isimatu.yasuaki@...fujitsu.com,
wujianguo@...wei.com, wency@...fujitsu.com, hpa@...or.com,
linfeng@...fujitsu.com, laijs@...fujitsu.com, mgorman@...e.de,
yinghai@...nel.org, glommer@...allels.com, x86@...nel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-acpi@...r.kernel.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
linux-ia64@...r.kernel.org, cmetcalf@...era.com,
sparclinux@...r.kernel.org
Subject: Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory
Hi Tang,
On Thu, 2013-01-31 at 11:31 +0800, Tang Chen wrote:
> Hi Simon,
>
> Please see below. :)
>
> On 01/31/2013 09:22 AM, Simon Jeons wrote:
> >
> > Sorry, I still confuse. :(
> > update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or
> > node_states[N_NORMAL_MEMOR] present 0...ZONE_MOVABLE?
> >
> > node_states is what? node_states[N_NORMAL_MEMOR] or
> > node_states[N_MEMORY]?
>
> Are you asking what node_states[] is ?
>
> node_states[] is an array of nodemask,
>
> extern nodemask_t node_states[NR_NODE_STATES];
>
> For example, node_states[N_NORMAL_MEMOR] represents which nodes have
> normal memory.
> If N_MEMORY == N_HIGH_MEMORY == N_NORMAL_MEMORY, node_states[N_MEMORY] is
> node_states[N_NORMAL_MEMOR]. So it represents which nodes have 0 ...
> ZONE_MOVABLE.
>
Sorry, how can nodes_state[N_NORMAL_MEMORY] represents a node have 0 ...
*ZONE_MOVABLE*, the comment of enum nodes_states said that
N_NORMAL_MEMORY just means the node has regular memory.
>
> > Why check !z1->wait_table in function move_pfn_range_left and function
> > __add_zone? I think zone->wait_table is initialized in
> > free_area_init_core, which will be called during system initialization
> > and hotadd_new_pgdat path.
>
> I think,
>
> free_area_init_core(), in the for loop,
> |--> size = zone_spanned_pages_in_node();
> |--> if (!size)
> continue; ---------------- If zone is empty, we jump
> out the for loop.
> |--> init_currently_empty_zone()
>
> So, if the zone is empty, wait_table is not initialized.
>
> In move_pfn_range_left(z1, z2), we move pages from z2 to z1. But z1
> could be empty.
> So we need to check it and initialize z1->wait_table because we are
> moving pages into it.
thanks.
>
>
> > There is a zone populated check in function online_pages. But zone is
> > populated in free_area_init_core which will be called during system
> > initialization and hotadd_new_pgdat path. Why still need this check?
> >
>
> Because we could also rebuild zone list when we offline pages.
>
> __offline_pages()
> |--> zone->present_pages -= offlined_pages;
> |--> if (!populated_zone(zone)) {
> build_all_zonelists(NULL, NULL);
> }
>
> If the zone is empty, and other zones on the same node is not empty, the
> node
> won't be offlined, and next time we online pages of this zone, the pgdat
> won't
> be initialized again, and we need to check populated_zone(zone) when
> onlining
> pages.
thanks.
>
> Thanks. :)
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists