aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/RCU/checklist.txt
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-05-07 16:43:30 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-07-02 15:34:03 -0400
commit74d874e7bdc5b09cedcc7da0de44db25888eea10 (patch)
tree72cf891de767436eaba95e06e0a575f461297f8e /Documentation/RCU/checklist.txt
parentcba6d0d64ee53772b285d0c0c288deefbeaf7775 (diff)
rcu: Update documentation to cover call_srcu() and srcu_barrier().
The advent of call_srcu() and srcu_barrier() obsoleted some of the documentation, so this commit brings that up to date. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/RCU/checklist.txt')
-rw-r--r--Documentation/RCU/checklist.txt39
1 files changed, 20 insertions, 19 deletions
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 5c8d74968090..fc103d7a0474 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -162,9 +162,9 @@ over a rather long period of time, but improvements are always welcome!
162 when publicizing a pointer to a structure that can 162 when publicizing a pointer to a structure that can
163 be traversed by an RCU read-side critical section. 163 be traversed by an RCU read-side critical section.
164 164
1655. If call_rcu(), or a related primitive such as call_rcu_bh() or 1655. If call_rcu(), or a related primitive such as call_rcu_bh(),
166 call_rcu_sched(), is used, the callback function must be 166 call_rcu_sched(), or call_srcu() is used, the callback function
167 written to be called from softirq context. In particular, 167 must be written to be called from softirq context. In particular,
168 it cannot block. 168 it cannot block.
169 169
1706. Since synchronize_rcu() can block, it cannot be called from 1706. Since synchronize_rcu() can block, it cannot be called from
@@ -202,11 +202,12 @@ over a rather long period of time, but improvements are always welcome!
202 updater uses call_rcu_sched() or synchronize_sched(), then 202 updater uses call_rcu_sched() or synchronize_sched(), then
203 the corresponding readers must disable preemption, possibly 203 the corresponding readers must disable preemption, possibly
204 by calling rcu_read_lock_sched() and rcu_read_unlock_sched(). 204 by calling rcu_read_lock_sched() and rcu_read_unlock_sched().
205 If the updater uses synchronize_srcu(), the the corresponding 205 If the updater uses synchronize_srcu() or call_srcu(),
206 readers must use srcu_read_lock() and srcu_read_unlock(), 206 the the corresponding readers must use srcu_read_lock() and
207 and with the same srcu_struct. The rules for the expedited 207 srcu_read_unlock(), and with the same srcu_struct. The rules for
208 primitives are the same as for their non-expedited counterparts. 208 the expedited primitives are the same as for their non-expedited
209 Mixing things up will result in confusion and broken kernels. 209 counterparts. Mixing things up will result in confusion and
210 broken kernels.
210 211
211 One exception to this rule: rcu_read_lock() and rcu_read_unlock() 212 One exception to this rule: rcu_read_lock() and rcu_read_unlock()
212 may be substituted for rcu_read_lock_bh() and rcu_read_unlock_bh() 213 may be substituted for rcu_read_lock_bh() and rcu_read_unlock_bh()
@@ -333,14 +334,14 @@ over a rather long period of time, but improvements are always welcome!
333 victim CPU from ever going offline.) 334 victim CPU from ever going offline.)
334 335
33514. SRCU (srcu_read_lock(), srcu_read_unlock(), srcu_dereference(), 33614. SRCU (srcu_read_lock(), srcu_read_unlock(), srcu_dereference(),
336 synchronize_srcu(), and synchronize_srcu_expedited()) may only 337 synchronize_srcu(), synchronize_srcu_expedited(), and call_srcu())
337 be invoked from process context. Unlike other forms of RCU, it 338 may only be invoked from process context. Unlike other forms of
338 -is- permissible to block in an SRCU read-side critical section 339 RCU, it -is- permissible to block in an SRCU read-side critical
339 (demarked by srcu_read_lock() and srcu_read_unlock()), hence the 340 section (demarked by srcu_read_lock() and srcu_read_unlock()),
340 "SRCU": "sleepable RCU". Please note that if you don't need 341 hence the "SRCU": "sleepable RCU". Please note that if you
341 to sleep in read-side critical sections, you should be using 342 don't need to sleep in read-side critical sections, you should be
342 RCU rather than SRCU, because RCU is almost always faster and 343 using RCU rather than SRCU, because RCU is almost always faster
343 easier to use than is SRCU. 344 and easier to use than is SRCU.
344 345
345 If you need to enter your read-side critical section in a 346 If you need to enter your read-side critical section in a
346 hardirq or exception handler, and then exit that same read-side 347 hardirq or exception handler, and then exit that same read-side
@@ -353,8 +354,8 @@ over a rather long period of time, but improvements are always welcome!
353 cleanup_srcu_struct(). These are passed a "struct srcu_struct" 354 cleanup_srcu_struct(). These are passed a "struct srcu_struct"
354 that defines the scope of a given SRCU domain. Once initialized, 355 that defines the scope of a given SRCU domain. Once initialized,
355 the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock() 356 the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock()
356 synchronize_srcu(), and synchronize_srcu_expedited(). A given 357 synchronize_srcu(), synchronize_srcu_expedited(), and call_srcu().
357 synchronize_srcu() waits only for SRCU read-side critical 358 A given synchronize_srcu() waits only for SRCU read-side critical
358 sections governed by srcu_read_lock() and srcu_read_unlock() 359 sections governed by srcu_read_lock() and srcu_read_unlock()
359 calls that have been passed the same srcu_struct. This property 360 calls that have been passed the same srcu_struct. This property
360 is what makes sleeping read-side critical sections tolerable -- 361 is what makes sleeping read-side critical sections tolerable --
@@ -374,7 +375,7 @@ over a rather long period of time, but improvements are always welcome!
374 requiring SRCU's read-side deadlock immunity or low read-side 375 requiring SRCU's read-side deadlock immunity or low read-side
375 realtime latency. 376 realtime latency.
376 377
377 Note that, rcu_assign_pointer() relates to SRCU just as they do 378 Note that, rcu_assign_pointer() relates to SRCU just as it does
378 to other forms of RCU. 379 to other forms of RCU.
379 380
38015. The whole point of call_rcu(), synchronize_rcu(), and friends 38115. The whole point of call_rcu(), synchronize_rcu(), and friends