locktorture: Make the rt_boost factor a tunable
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Tue, 13 Dec 2022 20:48:39 +0000 (20:48 +0000)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 5 Jan 2023 20:10:35 +0000 (12:10 -0800)
commitc24501b240741907ddfce52ffc186792db5ad3a5
treeda1f40a32fd7662cdcede518236e2935a9e4049e
parente01f3a1a589e314cf27bd2cb27d9c2c58e105a27
locktorture: Make the rt_boost factor a tunable

The rt boosting in locktorture has a factor variable s currently large enough
that boosting only happens once every minute or so. Add a tunable to reduce the
factor so that boosting happens more often, to test paths and arrive at failure
modes earlier. With this change, I can set the factor to like 50 and have the
boosting happens every 10 seconds or so.

Tested with boot parameters:
locktorture.torture_type=mutex_lock
locktorture.onoff_interval=1
locktorture.nwriters_stress=8
locktorture.stutter=0
locktorture.rt_boost=1
locktorture.rt_boost_factor=50
locktorture.nlocks=3

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/locking/locktorture.c