Skip to content

Commit

Permalink
rcutorture: Add fqs_holdoff check before fqs_task is created
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zqiang authored and Neeraj Upadhyay (AMD) committed Nov 23, 2023
1 parent af19a25 commit 90f1015
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/rcu/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -3872,7 +3872,9 @@ rcu_torture_init(void)
}
if (fqs_duration < 0)
fqs_duration = 0;
if (fqs_duration) {
if (fqs_holdoff < 0)
fqs_holdoff = 0;
if (fqs_duration && fqs_holdoff) {
/* Create the fqs thread */
firsterr = torture_create_kthread(rcu_torture_fqs, NULL,
fqs_task);
Expand Down

0 comments on commit 90f1015

Please sign in to comment.