]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/page_alloc: don't re-init pageset in zone_pcp_update()
authorCody P Schafer <cody@linux.vnet.ibm.com>
Thu, 27 Jun 2013 23:51:25 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:29 +0000 (16:37 +1000)
commit3fa2725ba7cc613302516ff4cd05027fc525d650
tree7cabba7a37d7e9d4d92ea0bffe71dbe112a8a097
parentc659d7fd286e0c4c397532d3d0da18859834ca99
mm/page_alloc: don't re-init pageset in zone_pcp_update()

When memory hotplug is triggered, we call pageset_init() on
per-cpu-pagesets which both contain pages and are in use, causing both the
leakage of those pages and (potentially) bad behaviour if a page is
allocated from a pageset while it is being cleared.

Avoid this by factoring out pageset_set_high_and_batch() (which contains
all needed logic too set a pageset's ->high and ->batch inrespective of
system state) from zone_pageset_init() and using the new
pageset_set_high_and_batch() instead of zone_pageset_init() in
zone_pcp_update().

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c