Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc: Update for SRCU-fast definitions and initialization

This commit documents the DEFINE_SRCU_FAST(), DEFINE_STATIC_SRCU_FAST(),
and init_srcu_struct_fast() API members.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <bpf@vger.kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>

authored by

Paul E. McKenney and committed by
Frederic Weisbecker
8c8250ee ac51c40c

+27 -21
+17 -16
Documentation/RCU/Design/Requirements/Requirements.rst
··· 2637 2637 that was held across as ``ss``-domain synchronize_srcu(), deadlock 2638 2638 would again be possible. Such a deadlock cycle could extend across an 2639 2639 arbitrarily large number of different SRCU domains. Again, with great 2640 - power comes great responsibility. 2640 + power comes great responsibility, though lockdep is now able to detect 2641 + this sort of deadlock. 2641 2642 2642 - Unlike the other RCU flavors, SRCU read-side critical sections can run 2643 - on idle and even offline CPUs. This ability requires that 2644 - srcu_read_lock() and srcu_read_unlock() contain memory barriers, 2645 - which means that SRCU readers will run a bit slower than would RCU 2646 - readers. It also motivates the smp_mb__after_srcu_read_unlock() API, 2647 - which, in combination with srcu_read_unlock(), guarantees a full 2648 - memory barrier. 2643 + Unlike the other RCU flavors, SRCU read-side critical sections can run on 2644 + idle and even offline CPUs, with the exception of srcu_read_lock_fast() 2645 + and friends. This ability requires that srcu_read_lock() and 2646 + srcu_read_unlock() contain memory barriers, which means that SRCU 2647 + readers will run a bit slower than would RCU readers. It also motivates 2648 + the smp_mb__after_srcu_read_unlock() API, which, in combination with 2649 + srcu_read_unlock(), guarantees a full memory barrier. 2649 2650 2650 2651 Also unlike other RCU flavors, synchronize_srcu() may **not** be 2651 2652 invoked from CPU-hotplug notifiers, due to the fact that SRCU grace ··· 2682 2681 that sort of load. Of course, your mileage may vary based on the speed 2683 2682 of your CPUs and the size of your memory. 2684 2683 2685 - The `SRCU 2686 - API <https://lwn.net/Articles/609973/#RCU%20Per-Flavor%20API%20Table>`__ 2684 + The `SRCU API 2685 + <https://lwn.net/Articles/609973/#RCU%20Per-Flavor%20API%20Table>`__ 2687 2686 includes srcu_read_lock(), srcu_read_unlock(), 2688 - srcu_dereference(), srcu_dereference_check(), 2689 - synchronize_srcu(), synchronize_srcu_expedited(), 2690 - call_srcu(), srcu_barrier(), and srcu_read_lock_held(). It 2691 - also includes DEFINE_SRCU(), DEFINE_STATIC_SRCU(), and 2692 - init_srcu_struct() APIs for defining and initializing 2693 - ``srcu_struct`` structures. 2687 + srcu_dereference(), srcu_dereference_check(), synchronize_srcu(), 2688 + synchronize_srcu_expedited(), call_srcu(), srcu_barrier(), 2689 + and srcu_read_lock_held(). It also includes DEFINE_SRCU(), 2690 + DEFINE_STATIC_SRCU(), DEFINE_SRCU_FAST(), DEFINE_STATIC_SRCU_FAST(), 2691 + init_srcu_struct(), and init_srcu_struct_fast() APIs for defining and 2692 + initializing ``srcu_struct`` structures. 2694 2693 2695 2694 More recently, the SRCU API has added polling interfaces: 2696 2695
+7 -5
Documentation/RCU/checklist.rst
··· 417 417 you should be using RCU rather than SRCU, because RCU is almost 418 418 always faster and easier to use than is SRCU. 419 419 420 - Also unlike other forms of RCU, explicit initialization and 421 - cleanup is required either at build time via DEFINE_SRCU() 422 - or DEFINE_STATIC_SRCU() or at runtime via init_srcu_struct() 423 - and cleanup_srcu_struct(). These last two are passed a 424 - "struct srcu_struct" that defines the scope of a given 420 + Also unlike other forms of RCU, explicit initialization 421 + and cleanup is required either at build time via 422 + DEFINE_SRCU(), DEFINE_STATIC_SRCU(), DEFINE_SRCU_FAST(), 423 + or DEFINE_STATIC_SRCU_FAST() or at runtime via either 424 + init_srcu_struct() or init_srcu_struct_fast() and 425 + cleanup_srcu_struct(). These last three are passed a 426 + `struct srcu_struct` that defines the scope of a given 425 427 SRCU domain. Once initialized, the srcu_struct is passed 426 428 to srcu_read_lock(), srcu_read_unlock() synchronize_srcu(), 427 429 synchronize_srcu_expedited(), and call_srcu(). A given
+3
Documentation/RCU/whatisRCU.rst
··· 1227 1227 1228 1228 DEFINE_SRCU 1229 1229 DEFINE_STATIC_SRCU 1230 + DEFINE_SRCU_FAST // for srcu_read_lock_fast() and friends 1231 + DEFINE_STATIC_SRCU_FAST // for srcu_read_lock_fast() and friends 1230 1232 init_srcu_struct 1233 + init_srcu_struct_fast 1231 1234 cleanup_srcu_struct 1232 1235 smp_mb__after_srcu_read_unlock 1233 1236