linux-stable/kernel/rcu
Peter Zijlstra 6428671bae locking/mutex: Optimize mutex_trylock() fast-path
A while back Viro posted a number of 'interesting' mutex_is_locked()
users on IRC, one of those was RCU.

RCU seems to use mutex_is_locked() to avoid doing mutex_trylock(), the
regular load before modify pattern.

While the use isn't wrong per se, its curious in that its needed at all,
mutex_trylock() should be good enough on its own to avoid the pointless
cacheline bounces.

So fix those and remove the mutex_is_locked() (ab)use from RCU.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Paul McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hpe.com>
Link: http://lkml.kernel.org/r/20160601185815.GW3190@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-06-08 15:17:01 +02:00
..
Makefile rcutorture: Add RCU grace-period performance tests 2016-03-31 13:37:38 -07:00
rcu.h tiny_rcu: Directly force QS when call_rcu_[bh|sched]() on idle_task 2015-01-06 11:01:12 -08:00
rcuperf.c rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. 2016-03-31 13:39:51 -07:00
rcutorture.c rcutorture: Add irqs-disabled test for call_rcu() 2016-04-21 13:47:04 -07:00
srcu.c rcu: Add rcu_normal kernel parameter to suppress expediting 2015-12-04 12:26:53 -08:00
sync.c rcu_sync: Cleanup the CONFIG_PROVE_RCU checks 2015-10-06 11:25:45 -07:00
tiny.c rcu: Use rcu_callback_t in call_rcu*() and friends 2015-10-06 11:08:05 -07:00
tiny_plugin.h rcu: Make rcu/tiny_plugin.h explicitly non-modular 2016-02-23 19:59:55 -08:00
tree.c locking/mutex: Optimize mutex_trylock() fast-path 2016-06-08 15:17:01 +02:00
tree.h Merge branches 'doc.2016.04.19a', 'exp.2016.03.31d', 'fixes.2016.03.31d' and 'torture.2016.04.21a' into HEAD 2016-04-21 13:48:20 -07:00
tree_plugin.h rcu: Consolidate expedited GP code into exp_funnel_lock() 2016-03-31 13:34:11 -07:00
tree_trace.c rcu: Shorten expedited_workdone* to exp_workdone* 2016-03-31 13:34:08 -07:00
update.c debugobjects: insulate non-fixup logic related to static obj from fixup callbacks 2016-05-19 19:12:14 -07:00