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
77 Letting RCU-protected pointers "leak" out of an RCU read-side
81 *before* letting them out of the RCU read-side critical section.
85 The whole point of RCU is to permit readers to run without
90 a. Use the RCU variants of the list and hlist update
92 an RCU-protected list. Alternatively, use the other
93 RCU-protected data structures that have been added to
110 appear to be atomic to RCU readers, nor will sequences
135 reordered to precede earlier stores. RCU code must take all of
146 code know exactly which pointers are protected by RCU.
163 of an RCU read-side critical section. See lockdep.rst
185 in their respective types of RCU-protected lists.
188 type of RCU-protected linked lists.
194 be traversed by an RCU read-side critical section.
230 7. As of v4.20, a given kernel implements only one RCU flavor, which
231 is RCU-sched for PREEMPTION=n and RCU-preempt for PREEMPTION=y.
241 srcu_struct. The rules for the expedited RCU grace-period-wait
259 network-driver NAPI (softirq) context. BPF relies heavily on RCU
289 used by the RCU-protected data structure, including
303 RCU grace period. There are of course many other
331 CPUs has been configured to offload all of its RCU callbacks onto
334 9. All RCU list-traversal primitives, which include
336 list_for_each_safe_rcu(), must be either within an RCU read-side
338 locks. RCU read-side critical sections are delimited by
344 The reason that it is permissible to use RCU list-traversal
357 10. Conversely, if you are in an RCU read-side critical section,
363 11. Any lock acquired by an RCU callback must be acquired elsewhere
366 in deadlock as soon as the RCU softirq handler happens to run
367 your RCU callback while interrupting that acquisition's critical
370 12. RCU callbacks can be and are executed in parallel. In many cases,
378 Do not assume that RCU callbacks will be executed on the same
380 For example, if a given CPU goes offline while having an RCU
381 callback pending, then that RCU callback will execute on some
382 surviving CPU. (If this was not the case, a self-spawning RCU
385 have their RCU callbacks executed on some other CPUs, in fact,
399 13. Unlike most flavors of RCU, it *is* permissible to block in an
401 and srcu_read_unlock()), hence the "SRCU": "sleepable RCU".
403 sections, you should be using RCU rather than SRCU, because RCU
406 Also unlike other forms of RCU, explicit initialization and
420 system than RCU would be if RCU's read-side critical sections
428 being globally amortized as they are for other forms of RCU.
439 It is also permissible to sleep in RCU Tasks Trace read-side
442 of RCU, and you should not use it without first checking with
446 other forms of RCU, but instead of rcu_dereference() you should
461 15. The various RCU read-side primitives do *not* necessarily contain
463 and the compiler to freely reorder code into and out of RCU
465 RCU update-side primitives to deal with this.
471 __rcu sparse checks to validate your RCU code. These can help
475 check that accesses to RCU-protected data structures
476 are carried out under the proper RCU read-side critical
482 (or friends) before an RCU grace period has elapsed
487 tag the pointer to the RCU-protected data structure
520 with the pair depending on the flavor of RCU: