Skip to content

Commit 3f0c06e

Browse files
committed
torture: Move torture_onoff() timeouts to hrtimers
In order to gain better race coverage, move the CPU-hotplug-related timed waits in torture_onoff() to torture_hrtimeout_jiffies(). Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 872948c commit 3f0c06e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/torture.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,12 @@ torture_onoff(void *arg)
354354

355355
if (onoff_holdoff > 0) {
356356
VERBOSE_TOROUT_STRING("torture_onoff begin holdoff");
357-
schedule_timeout_interruptible(onoff_holdoff);
357+
torture_hrtimeout_jiffies(onoff_holdoff, &rand);
358358
VERBOSE_TOROUT_STRING("torture_onoff end holdoff");
359359
}
360360
while (!torture_must_stop()) {
361361
if (disable_onoff_at_boot && !rcu_inkernel_boot_has_ended()) {
362-
schedule_timeout_interruptible(HZ / 10);
362+
torture_hrtimeout_jiffies(HZ / 10, &rand);
363363
continue;
364364
}
365365
cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
@@ -369,7 +369,7 @@ torture_onoff(void *arg)
369369
torture_online(cpu,
370370
&n_online_attempts, &n_online_successes,
371371
&sum_online, &min_online, &max_online);
372-
schedule_timeout_interruptible(onoff_interval);
372+
torture_hrtimeout_jiffies(onoff_interval, &rand);
373373
}
374374

375375
stop:

0 commit comments

Comments
 (0)