From: Wen Congyang Date: Thu, 25 Oct 2012 01:14:51 +0000 (+1100) Subject: memory-hotplug: build zonelist if a zone is populated after onlining pages X-Git-Tag: next-20121031~1^2~102 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0f1eef3bbe3f024ed46bc063e693ee608d79777b;p=karo-tx-linux.git memory-hotplug: build zonelist if a zone is populated after onlining pages After "memory-hotplug: allocate zone's pcp before onlining pages", we build zone list before onlining pages to allocate zone's pcp. But the zone doesn't have pages before onlining pages, and the zone is not in zonelist, so we still need to build zonelist after onlining pages. Signed-off-by: Wen Congyang Cc: David Rientjes Cc: Jiang Liu Cc: Len Brown Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Christoph Lameter Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 5c8ad6dcd18f..63ea7df124fa 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -529,7 +529,9 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages) zone->zone_pgdat->node_present_pages += onlined_pages; if (onlined_pages) { node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); - if (!need_zonelists_rebuild) + if (need_zonelists_rebuild) + build_all_zonelists(NULL, NULL); + else zone_pcp_update(zone); }