Lines Matching full:rcu

4 Review Checklist for RCU Patches
9 that make use of RCU. Violating any of the rules listed below will
14 0. Is RCU being applied to a read-mostly situation? If the data
17 performance measurements show that RCU is nonetheless the right
18 tool for the job. Yes, RCU does reduce read-side overhead by
20 of RCU will do much more reading than updating.
22 Another exception is where performance is not an issue, and RCU
27 Yet another exception is where the low real-time latency of RCU's
30 One final exception is where RCU readers are used to prevent
40 RCU does allow *readers* to run (almost) naked, but *writers* must
59 2. Do the RCU read-side critical sections make proper use of
66 As a rough rule of thumb, any dereference of an RCU-protected
72 Letting RCU-protected pointers "leak" out of an RCU read-side
76 *before* letting them out of the RCU read-side critical section.
80 The whole point of RCU is to permit readers to run without
85 a. Use the RCU variants of the list and hlist update
87 an RCU-protected list. Alternatively, use the other
88 RCU-protected data structures that have been added to
105 appear to be atomic to RCU readers, nor will sequences
125 reordered to precede earlier stores. RCU code must take all of
136 code know exactly which pointers are protected by RCU.
154 of an RCU read-side critical section. See lockdep.txt
176 in their respective types of RCU-protected lists.
179 type of RCU-protected linked lists.
185 be traversed by an RCU read-side critical section.
214 7. As of v4.20, a given kernel implements only one RCU flavor, which
215 is RCU-sched for PREEMPTION=n and RCU-preempt for PREEMPTION=y.
225 srcu_struct. The rules for the expedited RCU grace-period-wait
242 network-driver NAPI (softirq) context. BPF relies heavily on RCU
271 used by the RCU-protected data structure, including
285 RCU grace period. There are of course many other
309 offload all of its RCU callbacks onto a single CPU, or if the
312 9. All RCU list-traversal primitives, which include
314 list_for_each_safe_rcu(), must be either within an RCU read-side
316 locks. RCU read-side critical sections are delimited by
322 The reason that it is permissible to use RCU list-traversal
335 10. Conversely, if you are in an RCU read-side critical section,
341 11. Any lock acquired by an RCU callback must be acquired elsewhere
345 the RCU softirq handler happens to run your RCU callback while
348 12. RCU callbacks can be and are executed in parallel. In many cases,
356 Do not assume that RCU callbacks will be executed on the same
358 For example, if a given CPU goes offline while having an RCU
359 callback pending, then that RCU callback will execute on some
360 surviving CPU. (If this was not the case, a self-spawning RCU
363 have their RCU callbacks executed on some other CPUs, in fact,
367 13. Unlike other forms of RCU, it *is* permissible to block in an
369 and srcu_read_unlock()), hence the "SRCU": "sleepable RCU".
371 sections, you should be using RCU rather than SRCU, because RCU
374 Also unlike other forms of RCU, explicit initialization and
388 system than RCU would be if RCU's read-side critical sections
396 being globally amortized as they are for other forms of RCU.
408 other forms of RCU, but instead of rcu_dereference() you should
423 15. The various RCU read-side primitives do *not* necessarily contain
425 and the compiler to freely reorder code into and out of RCU
427 RCU update-side primitives to deal with this.
433 __rcu sparse checks to validate your RCU code. These can help
437 check that accesses to RCU-protected data
438 structures are carried out under the proper RCU
445 same object to call_rcu() (or friends) before an RCU
450 tag the pointer to the RCU-protected data
478 So if you need to wait for both an RCU grace period and for