torture: Move torture_shuffle() timeouts to hrtimers
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 26 Jun 2023 23:27:02 +0000 (16:27 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 14 Aug 2023 22:01:08 +0000 (15:01 -0700)
In order to gain better race coverage, move the CPU-migration timed
waits in torture_shuffle() to torture_hrtimeout_jiffies().

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

index 2c441d5a1bdd32cb5266206c008a08c36df851e0..c5311154bc4d56a479e5e2aea574efc6baddf4cc 100644 (file)
@@ -557,9 +557,11 @@ static void torture_shuffle_tasks(void)
  */
 static int torture_shuffle(void *arg)
 {
+       DEFINE_TORTURE_RANDOM(rand);
+
        VERBOSE_TOROUT_STRING("torture_shuffle task started");
        do {
-               schedule_timeout_interruptible(shuffle_interval);
+               torture_hrtimeout_jiffies(shuffle_interval, &rand);
                torture_shuffle_tasks();
                torture_shutdown_absorb("torture_shuffle");
        } while (!torture_must_stop());