aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-22 16:18:44 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-12-11 13:31:22 -0500
commit7077714ec4940a6c5b1189c3afb4f47bf49ad877 (patch)
treec8713205a1e6ce6973822bb76ea5e7e1774444ee /kernel/rcutree_plugin.h
parent389abd48efe1ceacb141b2fd151263b1bc432dbc (diff)
rcu: Make synchronize_sched_expedited() better at work sharing
When synchronize_sched_expedited() takes its second and subsequent snapshots of sync_sched_expedited_started, it subtracts 1. This means that the concurrent caller of synchronize_sched_expedited() that incremented to that value sees our successful completion, it will not be able to take advantage of it. This restriction is pointless, given that our full expedited grace period would have happened after the other guy started, and thus should be able to serve as a proxy for the other guy successfully executing try_stop_cpus(). This commit therefore removes the subtraction of 1. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 798605317161..708dc579634d 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1910,7 +1910,7 @@ void synchronize_sched_expedited(void)
1910 * grace period works for us. 1910 * grace period works for us.
1911 */ 1911 */
1912 get_online_cpus(); 1912 get_online_cpus();
1913 snap = atomic_read(&sync_sched_expedited_started) - 1; 1913 snap = atomic_read(&sync_sched_expedited_started);
1914 smp_mb(); /* ensure read is before try_stop_cpus(). */ 1914 smp_mb(); /* ensure read is before try_stop_cpus(). */
1915 } 1915 }
1916 1916