rcutorture: Force occasional reader waits
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 4 Jul 2018 21:14:42 +0000 (14:14 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 29 Aug 2018 16:20:48 +0000 (09:20 -0700)
commit444da518fd554eb1b9875dc97fac6ec249cee330
tree66b30935a20522ea61e26fba47184b15c8173737
parent31e7490741566d6f72be3a68bf9259a3bc2bc21d
rcutorture: Force occasional reader waits

Deferred quiescent states can interact with the scheduler, but
rcu_torture_reader() does not force such interaction all that frequently.
This commit therefore blocks for one jiffy after ten jiffies of read-side
runtime.  This has the beneficial effect of being most likely to block
just after long-running readers, and it is exactly these readers that
are most likely to have been preempted (in CONFIG_PREEMPT=y kernels).
This in turn helps increase the probability that a deferred quiescent
state will be seen by RCU's context-switch hooks.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcutorture.c