]> 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>
Thu, 25 Oct 2012 01:14:51 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 25 Oct 2012 03:14:38 +0000 (14:14 +1100)
commit287ada05f5110dab235c01be56497adeeb48d4b6
treea1fdba85e54b4a60ae5fd640239b307f54a344fd
parent10d6408a9e853d9f15fb08514b02aabff1043cc8
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