diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-04-18 17:25:03 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-08-18 20:05:32 -0400 |
commit | d84297c99bd9f63baf92c9f2d36582f879858664 (patch) | |
tree | 5fa42b0c2ef8ae93f016dd5b0ea318bc720f5482 /Documentation/RCU | |
parent | f7f7bac9cb1c50783f15937a11743655a5756a36 (diff) |
rcu: Fix rcu_barrier() documentation
There was a time when rcu_barrier() was guaranteed to wait for at least
a grace period, but that time ended due to energy-efficiency concerns.
So now rcu_barrier() is a no-op if there are no RCU callbacks queued in
the system. This commit updates the documentation to reflect this change.
Now, rcu_barrier() often does wait for a grace period, so, one could
imagine some modification to rcu_barrier() to more efficiently handle
cases where both rcu_barrier() and a grace period are needed. But this
must wait until someone shows a real-world need for a change.
Reported-by: Bob Copeland <bob@cozybit.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r-- | Documentation/RCU/rcubarrier.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/RCU/rcubarrier.txt b/Documentation/RCU/rcubarrier.txt index 2e319d1b9ef2..b10cfe711e68 100644 --- a/Documentation/RCU/rcubarrier.txt +++ b/Documentation/RCU/rcubarrier.txt | |||
@@ -70,10 +70,14 @@ in realtime kernels in order to avoid excessive scheduling latencies. | |||
70 | 70 | ||
71 | rcu_barrier() | 71 | rcu_barrier() |
72 | 72 | ||
73 | We instead need the rcu_barrier() primitive. This primitive is similar | 73 | We instead need the rcu_barrier() primitive. Rather than waiting for |
74 | to synchronize_rcu(), but instead of waiting solely for a grace | 74 | a grace period to elapse, rcu_barrier() waits for all outstanding RCU |
75 | period to elapse, it also waits for all outstanding RCU callbacks to | 75 | callbacks to complete. Please note that rcu_barrier() does -not- imply |
76 | complete. Pseudo-code using rcu_barrier() is as follows: | 76 | synchronize_rcu(), in particular, if there are no RCU callbacks queued |
77 | anywhere, rcu_barrier() is within its rights to return immediately, | ||
78 | without waiting for a grace period to elapse. | ||
79 | |||
80 | Pseudo-code using rcu_barrier() is as follows: | ||
77 | 81 | ||
78 | 1. Prevent any new RCU callbacks from being posted. | 82 | 1. Prevent any new RCU callbacks from being posted. |
79 | 2. Execute rcu_barrier(). | 83 | 2. Execute rcu_barrier(). |