Skip to content

Commit 90f1015

Browse files
Zqiangneeraju
authored andcommitted
rcutorture: Add fqs_holdoff check before fqs_task is created
For rcutorture tests on RCU implementations that support force-quiescent-state operations and that set the fqs_duration module parameter greater than zero, the fqs_task kthread will be created. However, if the fqs_holdoff module parameter is not set, then its default value of zero will cause fqs_task enter a long-term busy loop until stopped by kthread_stop(). This commit therefore adds a fqs_holdoff check before the fqs_task is created, making sure that whenever the fqs_task is created, the fqs_holdoff will be greater than zero. Signed-off-by: Zqiang <qiang.zhang1211@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
1 parent af19a25 commit 90f1015

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/rcu/rcutorture.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3872,7 +3872,9 @@ rcu_torture_init(void)
38723872
}
38733873
if (fqs_duration < 0)
38743874
fqs_duration = 0;
3875-
if (fqs_duration) {
3875+
if (fqs_holdoff < 0)
3876+
fqs_holdoff = 0;
3877+
if (fqs_duration && fqs_holdoff) {
38763878
/* Create the fqs thread */
38773879
firsterr = torture_create_kthread(rcu_torture_fqs, NULL,
38783880
fqs_task);

0 commit comments

Comments
 (0)