rcutorture: Preempt RCU-preempt readers more vigorously
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 16 Oct 2017 18:23:42 +0000 (11:23 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 11 Dec 2017 17:18:22 +0000 (09:18 -0800)
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>
kernel/rcu/rcutorture.c

index e7d3cce..1074ecc 100644 (file)
@@ -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. */
 }