1
0
Fork 0

torture: Intensify locking test

The current lock_torture_writer() spends too much time sleeping and not
enough time hammering locks, as in an eight-CPU test will often only be
utilizing a CPU or two.  This commit therefore makes lock_torture_writer()
sleep less and hammer more.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
wifi-calibration
Paul E. McKenney 2014-02-26 12:14:51 -08:00
parent 2f66dbc1e8
commit da601c63fd
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,8 @@ static int lock_torture_writer(void *arg)
set_user_nice(current, 19);
do {
schedule_timeout_uninterruptible(1);
if ((torture_random(&rand) & 0xfffff) == 0)
schedule_timeout_uninterruptible(1);
cur_ops->writelock();
if (WARN_ON_ONCE(lock_is_write_held))
lwsp->n_write_lock_fail++;