]> 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, 27 Jun 2013 23:51:22 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:27 +0000 (16:37 +1000)
commit67f9fa9ba4d72f1b5c8086a8b8b99fac9a45cc57
treec97f16024fc1e5e5675e58a8094eb2eb1e4dd445
parente551b1b3fcc9934732b1bc308e324d1ba466780d
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