rcutorture: Delay-based false positives for RCU priority boosting tests
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 8 Apr 2021 00:09:37 +0000 (17:09 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 10 May 2021 23:05:06 +0000 (16:05 -0700)
commit7b9dad7abad70750c7fbacd5eb5e917f73b42759
treef23562fa3bd9eb7a7144a4cd093654c4eface441
parent00ad25f6019b3bd61bd2ddc128509728b49ac589
rcutorture: Delay-based false positives for RCU priority boosting tests

If an rcu_torture_boost() kthread determines that its grace period
has not yet ended, it invokes rcu_torture_boost_failed() which checks
whether enough time has elapsed for this to be considered a failure of
RCU priority boosting, and, if so, flags the error.

Unfortunately, that kthread might be preempted for some seconds between
the time that it checks the grace period and the time that it checks the
time.  This delay can result in a false positive, featuring a complaint
that a particular grace period has not ended, followed by a diagnostic
dump featuring a much later grace period.

This commit avoids these false positives by rechecking for the end of
the grace period after the time check.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c