rcutorture: Require entire stutter period be post-boot
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 17 Nov 2020 00:01:50 +0000 (16:01 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Jan 2021 01:08:12 +0000 (17:08 -0800)
commit12a910e3cd3d11e00b2a2df24ea995ffa3e27ae5
treeca97d2f3635e67aa7558817146d655151a387937
parente76506f0e85129d726c487c873a2245c92446515
rcutorture: Require entire stutter period be post-boot

Currently, the rcu_torture_writer() function checks that all required
grace periods elapse during a stutter interval, which is a multi-second
time period during which the test load is removed.  However, this check
is suppressed during early boot (that is, before init is spawned) in
order to avoid false positives that otherwise occur due to heavy load
on the single boot CPU.

Unfortunately, this approach is insufficient.  It is possible that the
stutter interval might end just as init is spawned, so that early boot
conditions prevailed during almost the entire stutter interval.

This commit therefore takes a snapshot of boot-complete state just
before the stutter interval, thus suppressing the check for failure to
complete grace periods unless the entire stutter interval took place
after early boot.

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