Skip to content

Commit fbbd5e3

Browse files
committed
rcutorture: Make in-kernel-loop testing more brutal
The rcu_torture_fwd_prog_nr() tests the ability of RCU to tolerate in-kernel busy loops. It invokes rcu_torture_fwd_prog_cond_resched() within its delay loop, which, in PREEMPT && NO_HZ_FULL kernels results in the occasional direct call to schedule(). Now, this direct call to schedule() is appropriate for call_rcu() flood testing, in which either the kernel should restrain itself or userspace transitions will supply the needed restraint. But in pure in-kernel loops, the occasional cond_resched() should do the job. This commit therefore makes rcu_torture_fwd_prog_nr() use cond_resched() instead of rcu_torture_fwd_prog_cond_resched() in order to increase the brutality of this aspect of rcutorture testing. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 8b5ddf8 commit fbbd5e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ static void rcu_torture_fwd_prog_nr(int *tested, int *tested_tries)
18061806
udelay(10);
18071807
cur_ops->readunlock(idx);
18081808
if (!fwd_progress_need_resched || need_resched())
1809-
rcu_torture_fwd_prog_cond_resched(1);
1809+
cond_resched();
18101810
}
18111811
(*tested_tries)++;
18121812
if (!time_before(jiffies, stopat) &&

0 commit comments

Comments
 (0)