diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-10-23 16:47:01 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-11-13 17:08:23 -0500 |
commit | f0a0e6f282c72247e7c8ec17c68d528c1bb4d49e (patch) | |
tree | 22b66fc8ac9b95586866ddb447dcc8712d441c14 /kernel/rcutree_plugin.h | |
parent | 67afeed2cab0e59712b4ebf1aef9a2e555a188ce (diff) |
rcu: Clarify memory-ordering properties of grace-period primitives
This commit explicitly states the memory-ordering properties of the
RCU grace-period primitives. Although these properties were in some
sense implied by the fundmental property of RCU ("a grace period must
wait for all pre-existing RCU read-side critical sections to complete"),
stating it explicitly will be a great labor-saving device.
Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r-- | kernel/rcutree_plugin.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index f92115488187..57e0ef8ed721 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -670,6 +670,9 @@ EXPORT_SYMBOL_GPL(kfree_call_rcu); | |||
670 | * concurrently with new RCU read-side critical sections that began while | 670 | * concurrently with new RCU read-side critical sections that began while |
671 | * synchronize_rcu() was waiting. RCU read-side critical sections are | 671 | * synchronize_rcu() was waiting. RCU read-side critical sections are |
672 | * delimited by rcu_read_lock() and rcu_read_unlock(), and may be nested. | 672 | * delimited by rcu_read_lock() and rcu_read_unlock(), and may be nested. |
673 | * | ||
674 | * See the description of synchronize_sched() for more detailed information | ||
675 | * on memory ordering guarantees. | ||
673 | */ | 676 | */ |
674 | void synchronize_rcu(void) | 677 | void synchronize_rcu(void) |
675 | { | 678 | { |
@@ -875,6 +878,11 @@ EXPORT_SYMBOL_GPL(synchronize_rcu_expedited); | |||
875 | 878 | ||
876 | /** | 879 | /** |
877 | * rcu_barrier - Wait until all in-flight call_rcu() callbacks complete. | 880 | * rcu_barrier - Wait until all in-flight call_rcu() callbacks complete. |
881 | * | ||
882 | * Note that this primitive does not necessarily wait for an RCU grace period | ||
883 | * to complete. For example, if there are no RCU callbacks queued anywhere | ||
884 | * in the system, then rcu_barrier() is within its rights to return | ||
885 | * immediately, without waiting for anything, much less an RCU grace period. | ||
878 | */ | 886 | */ |
879 | void rcu_barrier(void) | 887 | void rcu_barrier(void) |
880 | { | 888 | { |