| /linux/kernel/rcu/ |
| H A D | Kconfig.debug | 3 # RCU-related debugging configuration options 6 menu "RCU Debugging" 12 bool "RCU list lockdep debugging" 16 Enable RCU lockdep checking for list usages. By default it is 17 turned off since there are several list RCU users that still 27 tristate "performance tests for RCU" 33 tests on the RCU infrastructure. The kernel module may be built 36 Say Y here if you want RCU performance tests to be built into 38 Say M if you want the RCU performance tests to build as a module. 42 tristate "torture tests for RCU" [all …]
|
| H A D | update.c | 50 #include "rcu.h" 68 * rcu_read_lock_held_common() - might we be in RCU-sched read-side critical section? 77 * RCU-sched read-side critical section. In absence of 78 * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side 80 * of preemption (including disabling irqs) counts as an RCU-sched 82 * that required that they be called within an RCU-sched read-side 88 * Note that if the CPU is in the idle loop from an RCU point of view (ie: 91 * rcu_read_lock(). The reason for this is that RCU ignores CPUs that are 93 * so such a CPU is effectively never in an RCU read-side critical section 94 * regardless of what RCU primitives it invokes. This state of affairs is [all …]
|
| H A D | tree.c | 15 * Documentation/RCU 18 #define pr_fmt(fmt) "rcu: " fmt 70 #include "rcu.h" 134 * RCU can assume that there is but one task, allowing RCU to (for example) 136 * is RCU_SCHEDULER_INIT, RCU must actually do all the hard work required 138 * boot-time false positives from lockdep-RCU error checking. Finally, it 139 * transitions from RCU_SCHEDULER_INIT to RCU_SCHEDULER_RUNNING after RCU 148 * is capable of creating new tasks. So RCU processing (for example, 149 * creating tasks for RCU priority boosting) must be delayed until after 151 * currently delay invocation of any RCU callbacks until after this point. [all …]
|
| /linux/Documentation/RCU/ |
| H A D | whatisRCU.rst | 3 What is RCU? -- "Read, Copy, Update" 6 Please note that the "What is RCU?" LWN series is an excellent place 7 to start learning about RCU: 9 | 1. What is RCU, Fundamentally? https://lwn.net/Articles/262464/ 10 | 2. What is RCU? Part 2: Usage https://lwn.net/Articles/263130/ 11 | 3. RCU part 3: the RCU API https://lwn.net/Articles/264090/ 12 | 4. The RCU API, 2010 Edition https://lwn.net/Articles/418853/ 14 | 5. The RCU API, 2014 Edition https://lwn.net/Articles/609904/ 16 | 6. The RCU API, 2019 Edition https://lwn.net/Articles/777036/ 18 | 7. The RCU API, 2024 Edition https://lwn.net/Articles/988638/ [all …]
|
| H A D | rcu.rst | 3 RCU Concepts 6 The basic idea behind RCU (read-copy update) is to split destructive 11 since dropped their references. For example, an RCU-protected deletion 14 information on using RCU with linked lists. 19 - Why would anyone want to use RCU? 21 The advantage of RCU's two-part approach is that RCU readers need 25 on modern CPUs is what gives RCU its performance advantages 26 in read-mostly situations. The fact that RCU readers need not 30 if the RCU readers give no indication when they are done? 32 Just as with spinlocks, RCU readers are not permitted to [all …]
|
| H A D | checklist.rst | 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 [all …]
|
| H A D | UP.rst | 3 RCU on Uniprocessor Systems 18 Suppose that an RCU-based algorithm scans a linked list containing 40 Suppose that an RCU-based algorithm again scans a linked list containing 45 RCU usage, since call_rcu() must wait for a grace period to elapse. 48 underlying RCU, namely that call_rcu() defers invoking its arguments until 49 all RCU read-side critical sections currently executing have completed. 85 What locking restriction must RCU callbacks respect? 89 It is important to note that userspace RCU implementations *do* 93 Nevertheless, people writing userspace RCU implementations are strongly 100 Permitting call_rcu() to immediately invoke its arguments breaks RCU, [all …]
|
| H A D | lockdep-splat.rst | 4 Lockdep-RCU Splat 7 Lockdep-RCU was added to the Linux kernel in early 2010 9 misuses of the RCU API, most notably using one of the rcu_dereference() 10 family to access an RCU-protected pointer without the proper protection. 11 When such misuse is detected, an lockdep-RCU splat is emitted. 13 The usual cause of a lockdep-RCU splat is someone accessing an 14 RCU-protected data structure without either (1) being in the right kind of 15 RCU read-side critical section or (2) holding the right update-side lock. 20 So let's look at an example RCU lockdep splat from 3.0-rc5, one that 24 WARNING: suspicious RCU usage [all …]
|
| H A D | rcu_dereference.rst | 7 important to correct use of things like RCU. To this end, the pointers 24 from your calls to rcu_dereference() and friends, thus keeping your RCU 28 to load an RCU-protected pointer, otherwise CONFIG_PROVE_RCU 80 - If you are using RCU to protect JITed functions, so that the 143 RCU-protected circular linked lists. 146 of an RCU read-side critical section, and the pointer 153 Within an RCU read-side critical section, there is little 185 That said, this situation can make certain RCU usage 188 of such an RCU usage bug is shown in the section titled 189 "EXAMPLE OF AMPLIFIED RCU-USAGE BUG". [all …]
|
| /linux/tools/memory-model/ |
| H A D | linux-kernel.cat | 64 let gp = po ; [Sync-rcu | Sync-srcu] ; po? 69 let barrier = fencerel(Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu | 71 Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock) | 121 (* RCU *) 129 * In the definition of rcu-fence below, the po term at the left-hand side 131 * out. They have been moved into the definitions of rcu-link and rb. 134 let rcu-gp = [Sync-rcu] (* Compare with gp *) 136 let rcu [all...] |
| H A D | linux-kernel.bell | 29 'rcu-lock (*rcu_read_lock*) || 30 'rcu-unlock (*rcu_read_unlock*) || 31 'sync-rcu (*synchronize_rcu*) || 56 (* Compute matching pairs of nested Rcu-lock and Rcu-unlock *) 57 let rcu-rscs = let rec 58 unmatched-locks = Rcu-lock \ domain(matched) 59 and unmatched-unlocks = Rcu-unlock \ range(matched) 69 flag ~empty Rcu-lock \ domain(rcu [all...] |
| /linux/Documentation/RCU/Design/Requirements/ |
| H A D | Requirements.rst | 2 A Tour Through RCU's Requirements 18 Read-copy update (RCU) is a synchronization mechanism that is often used 19 as a replacement for reader-writer locking. RCU is unusual in that 20 updaters do not block readers, which means that RCU's read-side 23 this concurrency between RCU readers and updaters does raise the 24 question of exactly what RCU readers are doing, which in turn raises the 25 question of exactly what RCU's requirements are. 27 This document therefore summarizes RCU's requirements, and can be 28 thought of as an informal, high-level specification for RCU. It is 29 important to understand that RCU's specification is primarily empirical [all …]
|
| /linux/include/linux/ |
| H A D | rcupdate.h | 50 // not-yet-completed RCU grace periods. 158 * Note a quasi-voluntary context switch for RCU-tasks's benefit. 228 * rcu_trace_implies_rcu_gp - does an RCU Tasks Trace grace period imply an RCU grace period? 230 * As an accident of implementation, an RCU Tasks Trace grace period also 231 * acts as an RCU grace period. However, this could change at any time. 240 * cond_resched_tasks_rcu_qs - Report potential quiescent states to RCU 243 * report potential quiescent states to RCU-tasks even if the cond_resched() 253 * rcu_softirq_qs_periodic - Report RCU and RCU-Tasks quiescent states 260 * provide both RCU and RCU-Tasks quiescent states. Note that this macro 263 * Because regions of code that have disabled softirq act as RCU read-side [all …]
|
| H A D | rcupdate_wait.h | 6 * RCU synchronization types and methods: 14 * Structure allowing asynchronous waiting on RCU. 42 * This macro waits concurrently for multiple types of RCU grace periods. 44 * on concurrent RCU and RCU-tasks grace periods. Waiting on a given SRCU 51 * invocation of call_rcu() and that of the corresponding RCU callback 54 * The first argument tells Tiny RCU's _wait_rcu_gp() not to 55 * bother waiting for RCU. The reason for this is because anywhere 71 // Has the current task blocked within its current RCU read-side
|
| H A D | srcutree.h | 261 * Note that both this_cpu_inc() and atomic_long_inc() are RCU read-side 266 * synchronize_rcu() or synchronize_rcu_expedited(), that is, RCU, 269 * The __srcu_read_unlock_fast() function also relies on this same RCU 272 * The key point behind this RCU trick is that if any part of a given 273 * RCU reader precedes the beginning of a given RCU grace period, then 274 * the entirety of that RCU reader and everything preceding it happens 275 * before the end of that same RCU grace period. Similarly, if any part 276 * of a given RCU reader follows the end of a given RCU grace period, 277 * then the entirety of that RCU reader and everything following it 278 * happens after the beginning of that same RCU grace period. Therefore, [all …]
|
| /linux/Documentation/devicetree/bindings/phy/ |
| H A D | lantiq,vrx200-pcie-phy.yaml | 45 lantiq,rcu: 47 description: phandle to the RCU syscon 49 lantiq,rcu-endian-offset: 51 description: the offset of the endian registers for this PHY instance in the RCU syscon 53 lantiq,rcu-big-endian-mask: 73 - lantiq,rcu 74 - lantiq,rcu-endian-offset 75 - lantiq,rcu-big-endian-mask 84 lantiq,rcu = <&rcu0>; 85 lantiq,rcu-endian-offset = <0x4c>; [all …]
|
| /linux/tools/rcu/ |
| H A D | rcu-cbs.py | 4 # Dump out the number of RCU callbacks outstanding. 6 # On older kernels having multiple flavors of RCU, this dumps out the 9 # Usage: sudo drgn rcu-cbs.py 22 rdp0 = prog.variable('rcu_preempt_data', 'kernel/rcu/tree.c'); 29 'kernel/rcu/tree.c'); 34 rdp0 = prog.variable('rcu_data', 'kernel/rcu/tree.c'); 39 # Sum up RCU callbacks. 44 # print("CPU " + str(cpu) + " RCU callbacks: " + str(len)); 46 print("Number of RCU callbacks in flight: " + str(sum));
|
| /linux/Documentation/translations/it_IT/RCU/ |
| H A D | torture.rst | 6 Le operazioni RCU per le verifiche *torture* 13 RCU. L'opzione creerà un modulo rcutorture che potrete caricare per avviare le 26 …rcu-torture:--- Start of test: nreaders=16 nfakewriters=4 stat_interval=30 verbose=0 test_no_idle_… 27 …rcu-torture: rtc: (null) ver: 155441 tfle: 0 rta: 155441 rtaf: 8884 rtf: 155440 rtmbe: 0… 28 rcu-torture: Reader Pipe: 727860534 34213 0 0 0 0 0 0 0 0 0 29 rcu-torture: Reader Batch: 727877838 17003 0 0 0 0 0 0 0 0 0 30 …rcu-torture: Free-Block Circulation: 155440 155440 155440 155440 155440 155440 155440 155440 1554… 31 …rcu-torture:--- End of test: SUCCESS: nreaders=16 nfakewriters=4 stat_interval=30 verbose=0 test_n… 47 * "ver": Il numero di volte dall'avvio che il processo scrittore di RCU ha 52 illuderti che RCU stia funzionando mentre invece non è il caso. :-/ [all …]
|
| /linux/Documentation/RCU/Design/Data-Structures/ |
| H A D | Data-Structures.rst | 12 This document describes RCU's major data structures and their relationship 18 RCU is for all intents and purposes a large state machine, and its 19 data structures maintain the state in such a way as to allow RCU readers 20 to execute extremely quickly, while also processing the RCU grace periods 22 The efficiency and scalability of RCU updaters is provided primarily 35 If the actual hardware has only 16 CPUs, RCU will adjust itself 88 32-bit system), then RCU will automatically add more levels to the tree. 90 65,536 CPUs, RCU would configure the ``rcu_node`` tree as follows: 94 RCU currently permits up to a four-level tree, which on a 64-bit system 102 and scalability benefits of partitioning, even though RCU grace-period [all …]
|
| /linux/Documentation/RCU/Design/Expedited-Grace-Periods/ |
| H A D | Expedited-Grace-Periods.rst | 8 This document describes RCU's expedited grace periods. 9 Unlike RCU's normal grace periods, which accept long latencies to attain 13 There are two flavors of RCU (RCU-preempt and RCU-sched), with an earlier 14 third RCU-bh flavor having been implemented in terms of the other two. 20 The expedited RCU grace periods cannot be accused of being subtle, 31 As always for RCU, once everything has spent some time in a quiescent 35 operation depend on the RCU flavor, as described in the following 38 RCU-preempt Expedited Grace Periods 41 ``CONFIG_PREEMPTION=y`` kernels implement RCU-preempt. 42 The overall flow of the handling of a given CPU by an RCU-preempt [all …]
|
| /linux/kernel/bpf/ |
| H A D | bpf_local_storage.c | 108 /* rcu tasks trace callback for use_kmalloc_nolock == false */ in bpf_selem_alloc() 109 static void __bpf_local_storage_free_trace_rcu(struct rcu_head *rcu) in bpf_selem_alloc() 113 /* If RCU Tasks Trace grace period implies RCU grace period, do in bpf_selem_alloc() 116 local_storage = container_of(rcu, struct bpf_local_storage, rcu); in __bpf_local_storage_free_trace_rcu() argument 120 kfree_rcu(local_storage, rcu); in __bpf_local_storage_free_trace_rcu() 128 kfree_rcu(local_storage, rcu); in __bpf_local_storage_free_trace_rcu() 130 call_rcu_tasks_trace(&local_storage->rcu, in bpf_local_storage_free_rcu() argument 134 static void bpf_local_storage_free_rcu(struct rcu_head *rcu) in bpf_local_storage_free_rcu() 138 bpf_local_storage_free_trace_rcu(struct rcu_head * rcu) bpf_local_storage_free_trace_rcu() argument 186 __bpf_selem_free_trace_rcu(struct rcu_head * rcu) __bpf_selem_free_trace_rcu() argument 207 bpf_selem_free_rcu(struct rcu_head * rcu) bpf_selem_free_rcu() argument 222 bpf_selem_free_trace_rcu(struct rcu_head * rcu) bpf_selem_free_trace_rcu() argument [all...] |
| /linux/tools/memory-model/Documentation/ |
| H A D | explanation.txt | 30 22. RCU RELATIONS: rcu-link, rcu-gp, rcu-rscsi, rcu-order, rcu-fence, and rb 929 Rcu: This requires that RCU read-side critical sections and 930 grace periods obey the rules of RCU, in particular, the 940 "rcu" and "plain-coherence" axioms are specific to the LKMM. 1513 RCU RELATIONS: rcu-link, rcu-gp, rcu-rscsi, rcu-order, rcu-fence, and rb 1516 RCU (Read-Copy-Update) is a powerful synchronization mechanism. It 1525 As far as memory models are concerned, RCU's main feature is its 1543 Here is a simple example of RCU in action: 1574 In the kernel's implementations of RCU, the requirements for stores 1576 suitable places in the RCU-related code. Thus, if a critical section [all …]
|
| /linux/kernel/trace/ |
| H A D | trace_preemptirq.c | 21 * tooling: these calls will only happen with RCU enabled, which can 24 * On older architectures, RCU may not be watching in idle. In that 25 * case, wake up RCU to watch while calling the tracepoint. These 55 * used in the low level entry code where the ordering vs. RCU is important 57 * tracking into a RCU on and a RCU off section. 86 * used in the low level entry code where the ordering vs. RCU is important 88 * tracking into a RCU on and a RCU off section.
|
| /linux/Documentation/devicetree/bindings/mips/lantiq/ |
| H A D | rcu.txt | 1 Lantiq XWAY SoC RCU binding 4 This binding describes the RCU (reset controller unit) multifunction device, 7 The RCU register range is used for multiple purposes. Mostly one device 10 With this patch all accesses to the RCU registers will go through 17 "lantiq,xrx200-rcu", "simple-mfd", "syscon" 22 Example of the RCU bindings on a xRX200 SoC: 23 rcu0: rcu@203000 { 24 compatible = "lantiq,xrx200-rcu", "simple-mfd", "syscon";
|
| /linux/Documentation/RCU/Design/Memory-Ordering/ |
| H A D | Tree-RCU-Memory-Ordering.rst | 12 This document gives a rough visual overview of how Tree RCU's 15 What Is Tree RCU's Grace Period Memory Ordering Guarantee? 18 RCU grace periods provide extremely strong memory-ordering guarantees 20 Any code that happens after the end of a given RCU grace period is guaranteed 22 period that are within RCU read-side critical sections. 23 Similarly, any code that happens before the beginning of a given RCU grace 25 of that grace period that are within RCU read-side critical sections. 27 Note well that RCU-sched read-side critical sections include any region 33 RCU updaters use this guarantee by splitting their updates into 37 a linked RCU-protected data structure, and phase two frees that element. [all …]
|