Browse files

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

This commit therefore removes the subtraction of 1.

Signed-off-by: Paul E. McKenney <>
Reviewed-by: Josh Triplett <>
  • Loading branch information...
1 parent 389abd4 commit 7077714ec4940a6c5b1189c3afb4f47bf49ad877 @paulmck paulmck committed Sep 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 kernel/rcutree_plugin.h
2 kernel/rcutree_plugin.h
@@ -1910,7 +1910,7 @@ void synchronize_sched_expedited(void)
* grace period works for us.
- snap = atomic_read(&sync_sched_expedited_started) - 1;
+ snap = atomic_read(&sync_sched_expedited_started);
smp_mb(); /* ensure read is before try_stop_cpus(). */

0 comments on commit 7077714

Please sign in to comment.