]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memory-hotplug: allocate zone's pcp before onlining pages
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 23 Oct 2012 02:50:14 +0000 (13:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 23 Oct 2012 03:11:48 +0000 (14:11 +1100)
commitbac699103c545693a4519be46ca0d6cd19fe57f0
tree59bf3aff6379acd241718732d4bb6e01aa840a63
parentb6c2b6a326686effe4a2e1f56bceb50e94bdc415
memory-hotplug: allocate zone's pcp before onlining pages

We use __free_page() to put a page to buddy system when onlining pages.
__free_page() will store NR_FREE_PAGES in zone's pcp.vm_stat_diff, so we
should allocate zone's pcp before onlining pages, otherwise we will lose
some free pages.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory_hotplug.c