scftorture: Prevent compiler from reducing race probabilities
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 1 Jul 2020 23:38:16 +0000 (16:38 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:38:36 +0000 (18:38 -0700)
commitee7035d29576dcb59b1191e5f609517cacab1e56
tree72cd20ebd862dd36da3d5a565c5ef14897d75848
parentdbf83b655a7853bc430af10e9a3e7eb1f4c90f86
scftorture: Prevent compiler from reducing race probabilities

Detecting smp_call_function() memory misordering requires close timing,
so it is necessary to have the checks immediately before and after
the call to the smp_call_function*() function under test.  This commit
therefore inserts barrier() calls to prevent the compiler from optimizing
memory-misordering detection down into the zone of extreme improbability.

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