locking/mcs: Allow architectures to hook in to contended paths
authorWill Deacon <will.deacon@arm.com>
Tue, 21 Jan 2014 23:36:10 +0000 (15:36 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 Jan 2014 12:13:28 +0000 (13:13 +0100)
commite207552e64ea053a33e856828ad7915484911d06
treecf3fcc21ce54d15edc8bf13373c786ed6511ee41
parent5faeb8adb956a5ad6579c4e309e8689943ad8294
locking/mcs: Allow architectures to hook in to contended paths

When contended, architectures may be able to reduce the polling overhead
in ways which aren't expressible using a simple relax() primitive.

This patch allows architectures to hook into the mcs_{lock,unlock}
functions for the contended cases only.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1390347370.3138.65.camel@schen9-DESK
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/mcs_spinlock.h