diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-03-27 05:04:06 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-03-27 05:04:06 -0400 |
| commit | 4bfe186dbe0a058680e4bfb0d673194f0ceaffd4 (patch) | |
| tree | 5e374857dcd979d50f51c7091505784cb053d078 | |
| parent | 3c435c1e472ba344ee25f795f4807d4457e61f6c (diff) | |
| parent | 42528795ac1c8d7ba021797ec004904168956d64 (diff) | |
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney:
- Documentation updates.
- Changes permitting use of call_rcu() and friends very early in
boot, for example, before rcu_init() is invoked.
- Miscellaneous fixes.
- Add in-kernel API to enable and disable expediting of normal RCU
grace periods.
- Improve RCU's handling of (hotplug-) outgoing CPUs.
Note: ARM support is lagging a bit here, and these improved
diagnostics might generate (harmless) splats.
- NO_HZ_FULL_SYSIDLE fixes.
- Tiny RCU updates to make it more tiny.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
30 files changed, 948 insertions, 437 deletions
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 183e41bdcb69..dab6da3382d9 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt | |||
| @@ -201,11 +201,11 @@ These routines add 1 and subtract 1, respectively, from the given | |||
| 201 | atomic_t and return the new counter value after the operation is | 201 | atomic_t and return the new counter value after the operation is |
| 202 | performed. | 202 | performed. |
| 203 | 203 | ||
| 204 | Unlike the above routines, it is required that explicit memory | 204 | Unlike the above routines, it is required that these primitives |
| 205 | barriers are performed before and after the operation. It must be | 205 | include explicit memory barriers that are performed before and after |
| 206 | done such that all memory operations before and after the atomic | 206 | the operation. It must be done such that all memory operations before |
| 207 | operation calls are strongly ordered with respect to the atomic | 207 | and after the atomic operation calls are strongly ordered with respect |
| 208 | operation itself. | 208 | to the atomic operation itself. |
| 209 | 209 | ||
| 210 | For example, it should behave as if a smp_mb() call existed both | 210 | For example, it should behave as if a smp_mb() call existed both |
| 211 | before and after the atomic operation. | 211 | before and after the atomic operation. |
| @@ -233,21 +233,21 @@ These two routines increment and decrement by 1, respectively, the | |||
| 233 | given atomic counter. They return a boolean indicating whether the | 233 | given atomic counter. They return a boolean indicating whether the |
| 234 | resulting counter value was zero or not. | 234 | resulting counter value was zero or not. |
| 235 | 235 | ||
| 236 | It requires explicit memory barrier semantics around the operation as | 236 | Again, these primitives provide explicit memory barrier semantics around |
| 237 | above. | 237 | the atomic operation. |
| 238 | 238 | ||
| 239 | int atomic_sub_and_test(int i, atomic_t *v); | 239 | int atomic_sub_and_test(int i, atomic_t *v); |
| 240 | 240 | ||
| 241 | This is identical to atomic_dec_and_test() except that an explicit | 241 | This is identical to atomic_dec_and_test() except that an explicit |
| 242 | decrement is given instead of the implicit "1". It requires explicit | 242 | decrement is given instead of the implicit "1". This primitive must |
| 243 | memory barrier semantics around the operation. | 243 | provide explicit memory barrier semantics around the operation. |
| 244 | 244 | ||
| 245 | int atomic_add_negative(int i, atomic_t *v); | 245 | int atomic_add_negative(int i, atomic_t *v); |
| 246 | 246 | ||
| 247 | The given increment is added to the given atomic counter value. A | 247 | The given increment is added to the given atomic counter value. A boolean |
| 248 | boolean is return which indicates whether the resulting counter value | 248 | is return which indicates whether the resulting counter value is negative. |
| 249 | is negative. It requires explicit memory barrier semantics around the | 249 | This primitive must provide explicit memory barrier semantics around |
| 250 | operation. | 250 | the operation. |
| 251 | 251 | ||
| 252 | Then: | 252 | Then: |
| 253 | 253 | ||
| @@ -257,7 +257,7 @@ This performs an atomic exchange operation on the atomic variable v, setting | |||
| 257 | the given new value. It returns the old value that the atomic variable v had | 257 | the given new value. It returns the old value that the atomic variable v had |
| 258 | just before the operation. | 258 | just before the operation. |
| 259 | 259 | ||
| 260 | atomic_xchg requires explicit memory barriers around the operation. | 260 | atomic_xchg must provide explicit memory barriers around the operation. |
| 261 | 261 | ||
| 262 | int atomic_cmpxchg(atomic_t *v, int old, int new); | 262 | int atomic_cmpxchg(atomic_t *v, int old, int new); |
| 263 | 263 | ||
| @@ -266,7 +266,7 @@ with the given old and new values. Like all atomic_xxx operations, | |||
| 266 | atomic_cmpxchg will only satisfy its atomicity semantics as long as all | 266 | atomic_cmpxchg will only satisfy its atomicity semantics as long as all |
| 267 | other accesses of *v are performed through atomic_xxx operations. | 267 | other accesses of *v are performed through atomic_xxx operations. |
| 268 | 268 | ||
| 269 | atomic_cmpxchg requires explicit memory barriers around the operation. | 269 | atomic_cmpxchg must provide explicit memory barriers around the operation. |
| 270 | 270 | ||
| 271 | The semantics for atomic_cmpxchg are the same as those defined for 'cas' | 271 | The semantics for atomic_cmpxchg are the same as those defined for 'cas' |
| 272 | below. | 272 | below. |
| @@ -279,8 +279,8 @@ If the atomic value v is not equal to u, this function adds a to v, and | |||
| 279 | returns non zero. If v is equal to u then it returns zero. This is done as | 279 | returns non zero. If v is equal to u then it returns zero. This is done as |
| 280 | an atomic operation. | 280 | an atomic operation. |
| 281 | 281 | ||
| 282 | atomic_add_unless requires explicit memory barriers around the operation | 282 | atomic_add_unless must provide explicit memory barriers around the |
| 283 | unless it fails (returns 0). | 283 | operation unless it fails (returns 0). |
| 284 | 284 | ||
| 285 | atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0) | 285 | atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0) |
| 286 | 286 | ||
| @@ -460,9 +460,9 @@ the return value into an int. There are other places where things | |||
| 460 | like this occur as well. | 460 | like this occur as well. |
| 461 | 461 | ||
| 462 | These routines, like the atomic_t counter operations returning values, | 462 | These routines, like the atomic_t counter operations returning values, |
| 463 | require explicit memory barrier semantics around their execution. All | 463 | must provide explicit memory barrier semantics around their execution. |
| 464 | memory operations before the atomic bit operation call must be made | 464 | All memory operations before the atomic bit operation call must be |
| 465 | visible globally before the atomic bit operation is made visible. | 465 | made visible globally before the atomic bit operation is made visible. |
| 466 | Likewise, the atomic bit operation must be visible globally before any | 466 | Likewise, the atomic bit operation must be visible globally before any |
| 467 | subsequent memory operation is made visible. For example: | 467 | subsequent memory operation is made visible. For example: |
| 468 | 468 | ||
| @@ -536,8 +536,9 @@ except that two underscores are prefixed to the interface name. | |||
| 536 | These non-atomic variants also do not require any special memory | 536 | These non-atomic variants also do not require any special memory |
| 537 | barrier semantics. | 537 | barrier semantics. |
| 538 | 538 | ||
| 539 | The routines xchg() and cmpxchg() need the same exact memory barriers | 539 | The routines xchg() and cmpxchg() must provide the same exact |
| 540 | as the atomic and bit operations returning values. | 540 | memory-barrier semantics as the atomic and bit operations returning |
| 541 | values. | ||
| 541 | 542 | ||
| 542 | Spinlocks and rwlocks have memory barrier expectations as well. | 543 | Spinlocks and rwlocks have memory barrier expectations as well. |
| 543 | The rule to follow is simple: | 544 | The rule to follow is simple: |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index bfcb1a62a7b4..5368ba701de2 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -2968,6 +2968,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2968 | Set maximum number of finished RCU callbacks to | 2968 | Set maximum number of finished RCU callbacks to |
| 2969 | process in one batch. | 2969 | process in one batch. |
| 2970 | 2970 | ||
| 2971 | rcutree.gp_init_delay= [KNL] | ||
| 2972 | Set the number of jiffies to delay each step of | ||
| 2973 | RCU grace-period initialization. This only has | ||
| 2974 | effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT is | ||
| 2975 | set. | ||
| 2976 | |||
| 2971 | rcutree.rcu_fanout_leaf= [KNL] | 2977 | rcutree.rcu_fanout_leaf= [KNL] |
| 2972 | Increase the number of CPUs assigned to each | 2978 | Increase the number of CPUs assigned to each |
| 2973 | leaf rcu_node structure. Useful for very large | 2979 | leaf rcu_node structure. Useful for very large |
| @@ -2991,11 +2997,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2991 | value is one, and maximum value is HZ. | 2997 | value is one, and maximum value is HZ. |
| 2992 | 2998 | ||
| 2993 | rcutree.kthread_prio= [KNL,BOOT] | 2999 | rcutree.kthread_prio= [KNL,BOOT] |
| 2994 | Set the SCHED_FIFO priority of the RCU | 3000 | Set the SCHED_FIFO priority of the RCU per-CPU |
| 2995 | per-CPU kthreads (rcuc/N). This value is also | 3001 | kthreads (rcuc/N). This value is also used for |
| 2996 | used for the priority of the RCU boost threads | 3002 | the priority of the RCU boost threads (rcub/N) |
| 2997 | (rcub/N). Valid values are 1-99 and the default | 3003 | and for the RCU grace-period kthreads (rcu_bh, |
| 2998 | |||
