aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/RCU/trace.txt10
-rw-r--r--Documentation/kernel-parameters.txt38
-rw-r--r--include/linux/rcupdate.h17
-rw-r--r--include/linux/rcutiny.h16
-rw-r--r--include/linux/rcutree.h2
-rw-r--r--include/trace/events/rcu.h79
-rw-r--r--kernel/rcu/Makefile1
-rw-r--r--kernel/rcu/rcuperf.c655
-rw-r--r--kernel/rcu/rcutorture.c12
-rw-r--r--kernel/rcu/tree.c298
-rw-r--r--kernel/rcu/tree.h20
-rw-r--r--kernel/rcu/tree_plugin.h37
-rw-r--r--kernel/rcu/tree_trace.c13
-rw-r--r--kernel/rcu/update.c4
-rw-r--r--kernel/torture.c4
-rw-r--r--lib/Kconfig.debug33
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/jitter.sh90
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh121
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh96
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck.sh5
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh59
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm.sh24
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcu/TREE042
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcu/TREE04.boot2
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcuperf/CFLIST1
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcuperf/CFcommon2
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcuperf/TREE20
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcuperf/TREE5423
-rw-r--r--tools/testing/selftests/rcutorture/configs/rcuperf/ver_functions.sh52
29 files changed, 1559 insertions, 177 deletions
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index ec6998b1b6d0..00a3a38b375a 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -237,17 +237,17 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
237 237
238The output of "cat rcu/rcu_preempt/rcuexp" looks as follows: 238The output of "cat rcu/rcu_preempt/rcuexp" looks as follows:
239 239
240s=21872 wd0=0 wd1=0 wd2=0 wd3=5 n=0 enq=0 sc=21872 240s=21872 wd1=0 wd2=0 wd3=5 n=0 enq=0 sc=21872
241 241
242These fields are as follows: 242These fields are as follows:
243 243
244o "s" is the sequence number, with an odd number indicating that 244o "s" is the sequence number, with an odd number indicating that
245 an expedited grace period is in progress. 245 an expedited grace period is in progress.
246 246
247o "wd0", "wd1", "wd2", and "wd3" are the number of times that an 247o "wd1", "wd2", and "wd3" are the number of times that an attempt
248 attempt to start an expedited grace period found that someone 248 to start an expedited grace period found that someone else had
249 else had completed an expedited grace period that satisfies the 249 completed an expedited grace period that satisfies the attempted
250 attempted request. "Our work is done." 250 request. "Our work is done."
251 251
252o "n" is number of times that a concurrent CPU-hotplug operation 252o "n" is number of times that a concurrent CPU-hotplug operation
253 forced a fallback to a normal grace period. 253 forced a fallback to a normal grace period.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index ecc74fa4bfde..da9ee466789b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3284,6 +3284,44 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3284 Lazy RCU callbacks are those which RCU can 3284 Lazy RCU callbacks are those which RCU can
3285 prove do nothing more than free memory. 3285 prove do nothing more than free memory.
3286 3286
3287 rcuperf.gp_exp= [KNL]
3288 Measure performance of expedited synchronous
3289 grace-period primitives.
3290
3291 rcuperf.holdoff= [KNL]
3292 Set test-start holdoff period. The purpose of
3293 this parameter is to delay the start of the
3294 test until boot completes in order to avoid
3295 interference.
3296
3297 rcuperf.nreaders= [KNL]
3298 Set number of RCU readers. The value -1 selects
3299 N, where N is the number of CPUs. A value
3300 "n" less than -1 selects N-n+1, where N is again
3301 the number of CPUs. For example, -2 selects N
3302 (the number of CPUs), -3 selects N+1, and so on.
3303 A value of "n" less than or equal to -N selects
3304 a single reader.
3305
3306 rcuperf.nwriters= [KNL]
3307 Set number of RCU writers. The values operate
3308 the same as for rcuperf.nreaders.
3309 N, where N is the number of CPUs
3310
3311 rcuperf.perf_runnable= [BOOT]
3312 Start rcuperf running at boot time.
3313
3314 rcuperf.shutdown= [KNL]
3315 Shut the system down after performance tests
3316 complete. This is useful for hands-off automated
3317 testing.
3318
3319 rcuperf.perf_type= [KNL]
3320 Specify the RCU implementation to test.
3321
3322 rcuperf.verbose= [KNL]
3323 Enable additional printk() statements.
3324
3287 rcutorture.cbflood_inter_holdoff= [KNL] 3325 rcutorture.cbflood_inter_holdoff= [KNL]
3288 Set holdoff time (jiffies) between successive 3326 Set holdoff time (jiffies) between successive
3289 callback-flood tests. 3327 callback-flood tests.
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 45de591657a6..5f1533e3d032 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -508,14 +508,7 @@ int rcu_read_lock_bh_held(void);
508 * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side 508 * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side
509 * critical section unless it can prove otherwise. 509 * critical section unless it can prove otherwise.
510 */ 510 */
511#ifdef CONFIG_PREEMPT_COUNT
512int rcu_read_lock_sched_held(void); 511int rcu_read_lock_sched_held(void);
513#else /* #ifdef CONFIG_PREEMPT_COUNT */
514static inline int rcu_read_lock_sched_held(void)
515{
516 return 1;
517}
518#endif /* #else #ifdef CONFIG_PREEMPT_COUNT */
519 512
520#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ 513#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
521 514
@@ -532,18 +525,10 @@ static inline int rcu_read_lock_bh_held(void)
532 return 1; 525 return 1;
533} 526}
534 527
535#ifdef CONFIG_PREEMPT_COUNT
536static inline int rcu_read_lock_sched_held(void) 528static inline int rcu_read_lock_sched_held(void)
537{ 529{
538 return preempt_count() != 0 || irqs_disabled(); 530 return !preemptible();
539} 531}
540#else /* #ifdef CONFIG_PREEMPT_COUNT */
541static inline int rcu_read_lock_sched_held(void)
542{
543 return 1;
544}
545#endif /* #else #ifdef CONFIG_PREEMPT_COUNT */
546
547#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ 532#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
548 533
549#ifdef CONFIG_PROVE_RCU 534#ifdef CONFIG_PROVE_RCU
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 64809aea661c..93aea75029fb 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -149,6 +149,22 @@ static inline unsigned long rcu_batches_completed_sched(void)
149 return 0; 149 return 0;
150} 150}
151 151
152/*
153 * Return the number of expedited grace periods completed.
154 */
155static inline unsigned long rcu_exp_batches_completed(void)
156{
157 return 0;
158}
159
160/*
161 * Return the number of expedited sched grace periods completed.
162 */
163static inline unsigned long rcu_exp_batches_completed_sched(void)
164{
165 return 0;
166}
167
152static inline void rcu_force_quiescent_state(void) 168static inline void rcu_force_quiescent_state(void)
153{ 169{
154} 170}
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index ad1eda9fa4da..5043cb823fb2 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -87,6 +87,8 @@ unsigned long rcu_batches_started_sched(void);
87unsigned long rcu_batches_completed(void); 87unsigned long rcu_batches_completed(void);
88unsigned long rcu_batches_completed_bh(void); 88unsigned long rcu_batches_completed_bh(void);
89unsigned long rcu_batches_completed_sched(void); 89unsigned long rcu_batches_completed_sched(void);
90unsigned long rcu_exp_batches_completed(void);
91unsigned long rcu_exp_batches_completed_sched(void);
90void show_rcu_gp_kthreads(void); 92void show_rcu_gp_kthreads(void);
91 93
92void rcu_force_quiescent_state(void); 94void rcu_force_quiescent_state(void);
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index ef72c4aada56..d3e756539d44 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -172,6 +172,77 @@ TRACE_EVENT(rcu_grace_period_init,