Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72472a02 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Paul E. McKenney
Browse files

rcu: Make rcutorture fakewriters invoke rcu_barrier()



The current rcutorture rcu_barrier() testing never intentionally runs
more than one instance of rcu_barrier() at a given time.  This fails
to test the the shiny new concurrency features of rcu_barrier().  This
commit therefore modifies the rcutorture fakewriter kthread to randomly
invoke rcu_barrier() rather than the usual synchronize_rcu().

Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 143aa672
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1025,6 +1025,10 @@ rcu_torture_fakewriter(void *arg)
	do {
		schedule_timeout_uninterruptible(1 + rcu_random(&rand)%10);
		udelay(rcu_random(&rand) & 0x3ff);
		if (cur_ops->cb_barrier != NULL &&
		    rcu_random(&rand) % (nfakewriters * 8) == 0)
			cur_ops->cb_barrier();
		else
			cur_ops->sync();
		rcu_stutter_wait("rcu_torture_fakewriter");
	} while (!kthread_should_stop() && fullstop == FULLSTOP_DONTSTOP);