rcutorture: Make rcu_torture_barrier_cbs() post from corresponding CPU
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 4 Feb 2020 23:00:56 +0000 (15:00 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 21 Feb 2020 00:03:31 +0000 (16:03 -0800)
commit50d4b62970e21e9573daf0e3c1138b4d1ebcca47
tree9b9a542b7b632ceb3bdef16513e5717de0438e9d
parent12af660321263d7744d5d06b765c7b03fade3858
rcutorture: Make rcu_torture_barrier_cbs() post from corresponding CPU

Currently, rcu_torture_barrier_cbs() posts callbacks from whatever CPU
it is running on, which means that all these kthreads might well be
posting from the same CPU, which would drastically reduce the effectiveness
of this test.  This commit therefore uses IPIs to make the callbacks be
posted from the corresponding CPU (given by local variable myid).

If the IPI fails (which can happen if the target CPU is offline or does
not exist at all), the callback is posted on whatever CPU is currently
running.

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