]> 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>
Wed, 19 Jun 2013 00:05:56 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:58 +0000 (17:12 +1000)
commitf7694b68826e2259069d14f201a54be2db7cdd47
treea405593415647527b06787640dec4e9d0409f0b1
parent0e25bbcd978b878ccae3d2fbd75d05f873eb5aa1
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