Skip to content

Commit

Permalink
torture: Move stutter_wait() timeouts to hrtimers
Browse files Browse the repository at this point in the history
[ Upstream commit 10af436 ]

In order to gain better race coverage, move the test start/stop
waits in stutter_wait() to torture_hrtimeout_jiffies().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Stable-dep-of: cca42bd ("rcutorture: Fix stuttering races and other issues")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
paulmckrcu authored and gregkh committed Nov 28, 2023
1 parent 3bdabd7 commit 05eb100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/torture.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,15 +734,15 @@ bool stutter_wait(const char *title)
ret = true;
}
if (spt == 1) {
schedule_timeout_interruptible(1);
torture_hrtimeout_jiffies(1, NULL);
} else if (spt == 2) {
while (READ_ONCE(stutter_pause_test)) {
if (!(i++ & 0xffff))
torture_hrtimeout_us(10, 0, NULL);
cond_resched();
}
} else {
schedule_timeout_interruptible(round_jiffies_relative(HZ));
torture_hrtimeout_jiffies(round_jiffies_relative(HZ), NULL);
}
torture_shutdown_absorb(title);
}
Expand Down

0 comments on commit 05eb100

Please sign in to comment.