]> 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>
Thu, 23 May 2013 00:37:11 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:09:01 +0000 (16:09 +1000)
commit8d7176a9ba94421ce65c6ba250f3bf8d0601abe4
treead033364d264cbf5f8895abe2f8f60f5e4a1a188
parent301fcab1cc95dc870c75959dfd1a418f23847bca
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