Commit 3c80b402 authored by Paul E. McKenney's avatar Paul E. McKenney

rcutorture: Convert ULONG_CMP_LT() to time_before()

This commit converts three ULONG_CMP_LT() invocations in rcutorture to
time_before() to reflect the fact that they are comparing timestamps to
the jiffies counter.
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 04dbcdb4
...@@ -848,7 +848,7 @@ static int rcu_torture_boost(void *arg) ...@@ -848,7 +848,7 @@ static int rcu_torture_boost(void *arg)
/* Wait for the next test interval. */ /* Wait for the next test interval. */
oldstarttime = boost_starttime; oldstarttime = boost_starttime;
while (ULONG_CMP_LT(jiffies, oldstarttime)) { while (time_before(jiffies, oldstarttime)) {
schedule_timeout_interruptible(oldstarttime - jiffies); schedule_timeout_interruptible(oldstarttime - jiffies);
stutter_wait("rcu_torture_boost"); stutter_wait("rcu_torture_boost");
if (torture_must_stop()) if (torture_must_stop())
...@@ -858,7 +858,7 @@ static int rcu_torture_boost(void *arg) ...@@ -858,7 +858,7 @@ static int rcu_torture_boost(void *arg)
/* Do one boost-test interval. */ /* Do one boost-test interval. */
endtime = oldstarttime + test_boost_duration * HZ; endtime = oldstarttime + test_boost_duration * HZ;
call_rcu_time = jiffies; call_rcu_time = jiffies;
while (ULONG_CMP_LT(jiffies, endtime)) { while (time_before(jiffies, endtime)) {
/* If we don't have a callback in flight, post one. */ /* If we don't have a callback in flight, post one. */
if (!smp_load_acquire(&rbi.inflight)) { if (!smp_load_acquire(&rbi.inflight)) {
/* RCU core before ->inflight = 1. */ /* RCU core before ->inflight = 1. */
...@@ -929,7 +929,7 @@ rcu_torture_fqs(void *arg) ...@@ -929,7 +929,7 @@ rcu_torture_fqs(void *arg)
VERBOSE_TOROUT_STRING("rcu_torture_fqs task started"); VERBOSE_TOROUT_STRING("rcu_torture_fqs task started");
do { do {
fqs_resume_time = jiffies + fqs_stutter * HZ; fqs_resume_time = jiffies + fqs_stutter * HZ;
while (ULONG_CMP_LT(jiffies, fqs_resume_time) && while (time_before(jiffies, fqs_resume_time) &&
!kthread_should_stop()) { !kthread_should_stop()) {
schedule_timeout_interruptible(1); schedule_timeout_interruptible(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment