summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcutorture.c
diff options
context:
space:
mode:
authorPaul E. McKenney2017-10-16 20:23:42 +0200
committerPaul E. McKenney2017-12-11 18:18:22 +0100
commite8302739aa2204d52dacf9e9619cb6e755fa997a (patch)
treef6411699883d58a5ef4ca10651bfd3564f72706c /kernel/rcu/rcutorture.c
parenttorture: Reduce #ifdefs for preempt_schedule() (diff)
downloadkernel-qcow2-linux-e8302739aa2204d52dacf9e9619cb6e755fa997a.tar.gz
kernel-qcow2-linux-e8302739aa2204d52dacf9e9619cb6e755fa997a.tar.xz
kernel-qcow2-linux-e8302739aa2204d52dacf9e9619cb6e755fa997a.zip
rcutorture: Preempt RCU-preempt readers more vigorously
This commit attempts to make a very rare rcutorture failure happen more often by increasing the fraction of RCU-preempt read-side critical sections that are preempted. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/rcutorture.c')
-rw-r--r--kernel/rcu/rcutorture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index e7d3cce84214..1074ecc3f72f 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -316,7 +316,7 @@ static void rcu_read_delay(struct torture_random_state *rrsp)
if (!(torture_random(rrsp) % (nrealreaders * 2 * shortdelay_us)))
udelay(shortdelay_us);
if (!preempt_count() &&
- !(torture_random(rrsp) % (nrealreaders * 20000)))
+ !(torture_random(rrsp) % (nrealreaders * 500)))
torture_preempt_schedule(); /* QS only if preemptible. */
}