rcutorture: Use per-CPU random state for rcu_torture_timer()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 22 May 2018 18:38:47 +0000 (11:38 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 22:42:04 +0000 (15:42 -0700)
commit3025520ec424df8b0fd5cdc319ad6b83406d9954
treec58744959ebe2755b9c5dcb6b78049eaa6f866f1
parent8da9a59523b6608f4b21f3e489578d0993c0779f
rcutorture: Use per-CPU random state for rcu_torture_timer()

Currently, the rcu_torture_timer() function uses a single global
torture_random_state structure protected by a single global lock.
This conflicts to some extent with performance and scalability,
but even more with the goal of consolidating read-side testing
with rcu_torture_reader().  This commit therefore creates a per-CPU
torture_random_state structure for use by rcu_torture_timer() and
eliminates the lock.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Make rcu_torture_timer_rand static, per 0day Test Robot report. ]
include/linux/torture.h
kernel/rcu/rcutorture.c