]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/page_alloc: prevent concurrent updaters of pcp ->batch and ->high
authorCody P Schafer <cody@linux.vnet.ibm.com>
Wed, 19 Jun 2013 00:05:52 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:56 +0000 (17:12 +1000)
commit350d6fe69fa5304165398b20c16887016e752c29
treef37bd956c559491277172c8e0ee3d63290741823
parent395cdb2a5d49db509f925ea316925b21f963c6f8
mm/page_alloc: prevent concurrent updaters of pcp ->batch and ->high

Because we are going to rely upon a careful transision between old and new
->high and ->batch values using memory barriers and will remove
stop_machine(), we need to prevent multiple updaters from interweaving
their memory writes.

Add a simple mutex to protect both update loops.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c