rcu: increase synchronize_sched_expedited() batching
authorTejun Heo <tj@kernel.org>
Tue, 23 Nov 2010 05:36:11 +0000 (21:36 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 17 Dec 2010 20:34:08 +0000 (12:34 -0800)
commite27fc9641e8ddc8146f8e01f06e5eba2469698de
tree5cff4c23cb113b901718d9c0f4a6e3081f3173bd
parent46fdb0937f26124700fc9fc80da4776330cc00d3
rcu: increase synchronize_sched_expedited() batching

The fix in commit #6a0cc49 requires more than three concurrent instances
of synchronize_sched_expedited() before batching is possible.  This
patch uses a ticket-counter-like approach that is also not unrelated to
Lai Jiangshan's Ring RCU to allow sharing of expedited grace periods even
when there are only two concurrent instances of synchronize_sched_expedited().

This commit builds on Tejun's original posting, which may be found at
http://lkml.org/lkml/2010/11/9/204, adding memory barriers, avoiding
overflow of signed integers (other than via atomic_t), and fixing the
detection of batching.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/rcupdate.h
kernel/rcutree_plugin.h