Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
kernel/rcu/rcutorture.c
··· 316 316 if (!(torture_random(rrsp) % (nrealreaders * 2 * shortdelay_us))) 317 317 udelay(shortdelay_us); 318 318 if (!preempt_count() && 319 - !(torture_random(rrsp) % (nrealreaders * 20000))) 319 + !(torture_random(rrsp) % (nrealreaders * 500))) 320 320 torture_preempt_schedule(); /* QS only if preemptible. */ 321 321 } 322 322