diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-07-06 10:13:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-07-06 10:13:58 -0400 |
commit | 5c09d127a112a78f95572921af88224f4091eb44 (patch) | |
tree | 3b3c984f035a2d82df6dbdcc6fdff5a6c7e69b00 /Documentation | |
parent | c4aed353b1b079eb4843e6a708fc68b4b28f72aa (diff) | |
parent | 5cf05ad758c30d17ff23c2be346b5de982bc2121 (diff) |
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull the RCU tree from Paul E. McKenney:
"The major features of this series are:
1. Preventing latency spikes of more than 200 microseconds for
kernels built with NR_CPUS=4096, which is reportedly becoming
the default for some distros. This is a first step, as it does
not help with systems that actually -have- 4096 CPUs (work on
this case is in progress, but is not yet ready for mainline).
This category also includes improving concurrency of rcu_barrier(),
placed here due to conflicts. Posted to LKML at:
https://lkml.org/lkml/2012/6/22/381. Note that patches 18-22
of that series have been defered to 3.7, as they have not yet
proven themselves to be mainline-ready (and yes, these are the
ones intended to get rid of RCU's latency spikes for systems
that actually have 4096 CPUs).
2. Updates to documentation and rcutorture fixes, the latter category
including improvements to rcu_barrier() testing. Posted to LKML at:
http://lkml.indiana.edu/hypermail/linux/kernel/1206.1/04094.html.
3. Miscellaneous fixes posted to LKML at:
https://lkml.org/lkml/2012/6/22/500, with the exception of the
last commit, which was posted here:
http://www.gossamer-threads.com/lists/linux/kernel/1561830
4. RCU_FAST_NO_HZ fixes and improvements. Posted to LKML at:
http://lkml.indiana.edu/hypermail/linux/kernel/1206.1/00006.html
and http://www.gossamer-threads.com/lists/linux/kernel/1561833.
The first four patches of the first series went into 3.5 to fix
a regression.
5. Code-style fixes. These were posted to LKML at
http://lkml.indiana.edu/hypermail/linux/kernel/1205.2/01180.html and
http://lkml.indiana.edu/hypermail/linux/kernel/1205.2/01181.html.
"
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/RCU/checklist.txt | 39 | ||||
-rw-r--r-- | Documentation/RCU/rcubarrier.txt | 15 | ||||
-rw-r--r-- | Documentation/RCU/torture.txt | 9 | ||||
-rw-r--r-- | Documentation/RCU/whatisRCU.txt | 6 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 5 |
5 files changed, 41 insertions, 33 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 | ||
165 | 5. If call_rcu(), or a related primitive such as call_rcu_bh() or | 165 | 5. 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 | ||
170 | 6. Since synchronize_rcu() can block, it cannot be called from | 170 | 6. 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 | ||
335 | 14. SRCU (srcu_read_lock(), srcu_read_unlock(), srcu_dereference(), | 336 | 14. 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 | ||
380 | 15. The whole point of call_rcu(), synchronize_rcu(), and friends | 381 | 15. The whole point of call_rcu(), synchronize_rcu(), and friends |
diff --git a/Documentation/RCU/rcubarrier.txt b/Documentation/RCU/rcubarrier.txt index e439a0edee22..38428c125135 100644 --- a/Documentation/RCU/rcubarrier.txt +++ b/Documentation/RCU/rcubarrier.txt | |||
@@ -79,8 +79,6 @@ complete. Pseudo-code using rcu_barrier() is as follows: | |||
79 | 2. Execute rcu_barrier(). | 79 | 2. Execute rcu_barrier(). |
80 | 3. Allow the module to be unloaded. | 80 | 3. Allow the module to be unloaded. |
81 | 81 | ||
82 | Quick Quiz #1: Why is there no srcu_barrier()? | ||
83 | |||
84 | The rcutorture module makes use of rcu_barrier in its exit function | 82 | The rcutorture module makes use of rcu_barrier in its exit function |
85 | as follows: | 83 | as follows: |
86 | 84 | ||
@@ -162,7 +160,7 @@ for any pre-existing callbacks to complete. | |||
162 | Then lines 55-62 print status and do operation-specific cleanup, and | 160 | Then lines 55-62 print status and do operation-specific cleanup, and |
163 | then return, permitting the module-unload operation to be completed. | 161 | then return, permitting the module-unload operation to be completed. |
164 | 162 | ||
165 | Quick Quiz #2: Is there any other situation where rcu_barrier() might | 163 | Quick Quiz #1: Is there any other situation where rcu_barrier() might |
166 | be required? | 164 | be required? |
167 | 165 | ||
168 | Your module might have additional complications. For example, if your | 166 | Your module might have additional complications. For example, if your |
@@ -242,7 +240,7 @@ reaches zero, as follows: | |||
242 | 4 complete(&rcu_barrier_completion); | 240 | 4 complete(&rcu_barrier_completion); |
243 | 5 } | 241 | 5 } |
244 | 242 | ||
245 | Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes | 243 | Quick Quiz #2: What happens if CPU 0's rcu_barrier_func() executes |
246 | immediately (thus incrementing rcu_barrier_cpu_count to the | 244 | immediately (thus incrementing rcu_barrier_cpu_count to the |
247 | value one), but the other CPU's rcu_barrier_func() invocations | 245 | value one), but the other CPU's rcu_barrier_func() invocations |
248 | are delayed for a full grace period? Couldn't this result in | 246 | are delayed for a full grace period? Couldn't this result in |
@@ -259,12 +257,7 @@ so that your module may be safely unloaded. | |||
259 | 257 | ||
260 | Answers to Quick Quizzes | 258 | Answers to Quick Quizzes |
261 | 259 | ||
262 | Quick Quiz #1: Why is there no srcu_barrier()? | 260 | Quick Quiz #1: Is there any other situation where rcu_barrier() might |
263 | |||
264 | Answer: Since there is no call_srcu(), there can be no outstanding SRCU | ||
265 | callbacks. Therefore, there is no need to wait for them. | ||
266 | |||
267 | Quick Quiz #2: Is there any other situation where rcu_barrier() might | ||
268 | be required? | 261 | be required? |
269 | 262 | ||
270 | Answer: Interestingly enough, rcu_barrier() was not originally | 263 | Answer: Interestingly enough, rcu_barrier() was not originally |
@@ -278,7 +271,7 @@ Answer: Interestingly enough, rcu_barrier() was not originally | |||
278 | implementing rcutorture, and found that rcu_barrier() solves | 271 | implementing rcutorture, and found that rcu_barrier() solves |
279 | this problem as well. | 272 | this problem as well. |
280 | 273 | ||
281 | Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes | 274 | Quick Quiz #2: What happens if CPU 0's rcu_barrier_func() executes |
282 | immediately (thus incrementing rcu_barrier_cpu_count to the | 275 | immediately (thus incrementing rcu_barrier_cpu_count to the |
283 | value one), but the other CPU's rcu_barrier_func() invocations | 276 | value one), but the other CPU's rcu_barrier_func() invocations |
284 | are delayed for a full grace period? Couldn't this result in | 277 | are delayed for a full grace period? Couldn't this result in |
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index 4ddf3913fd8c..7dce8a17eac2 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt | |||
@@ -174,11 +174,20 @@ torture_type The type of RCU to test, with string values as follows: | |||
174 | and synchronize_rcu_bh_expedited(). | 174 | and synchronize_rcu_bh_expedited(). |
175 | 175 | ||
176 | "srcu": srcu_read_lock(), srcu_read_unlock() and | 176 | "srcu": srcu_read_lock(), srcu_read_unlock() and |
177 | call_srcu(). | ||
178 | |||
179 | "srcu_sync": srcu_read_lock(), srcu_read_unlock() and | ||
177 | synchronize_srcu(). | 180 | synchronize_srcu(). |
178 | 181 | ||
179 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and | 182 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and |
180 | synchronize_srcu_expedited(). | 183 | synchronize_srcu_expedited(). |
181 | 184 | ||
185 | "srcu_raw": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
186 | and call_srcu(). | ||
187 | |||
188 | "srcu_raw_sync": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
189 | and synchronize_srcu(). | ||
190 | |||
182 | "sched": preempt_disable(), preempt_enable(), and | 191 | "sched": preempt_disable(), preempt_enable(), and |
183 | call_rcu_sched(). | 192 | call_rcu_sched(). |
184 | 193 | ||
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 6bbe8dcdc3da..69ee188515e7 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -833,9 +833,9 @@ sched: Critical sections Grace period Barrier | |||
833 | 833 | ||
834 | SRCU: Critical sections Grace period Barrier | 834 | SRCU: Critical sections Grace period Barrier |
835 | 835 | ||
836 | srcu_read_lock synchronize_srcu N/A | 836 | srcu_read_lock synchronize_srcu srcu_barrier |
837 | srcu_read_unlock synchronize_srcu_expedited | 837 | srcu_read_unlock call_srcu |
838 | srcu_read_lock_raw | 838 | srcu_read_lock_raw synchronize_srcu_expedited |
839 | srcu_read_unlock_raw | 839 | srcu_read_unlock_raw |
840 | srcu_dereference | 840 | srcu_dereference |
841 | 841 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a92c5ebf373e..12783fa833c3 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -2367,6 +2367,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2367 | Set maximum number of finished RCU callbacks to process | 2367 | Set maximum number of finished RCU callbacks to process |
2368 | in one batch. | 2368 | in one batch. |
2369 | 2369 | ||
2370 | rcutree.fanout_leaf= [KNL,BOOT] | ||
2371 | Increase the number of CPUs assigned to each | ||
2372 | leaf rcu_node structure. Useful for very large | ||
2373 | systems. | ||
2374 | |||
2370 | rcutree.qhimark= [KNL,BOOT] | 2375 | rcutree.qhimark= [KNL,BOOT] |
2371 | Set threshold of queued | 2376 | Set threshold of queued |
2372 | RCU callbacks over which batch limiting is disabled. | 2377 | RCU callbacks over which batch limiting is disabled. |