[PATCH] rcutorture: Add fqs_holdoff check before the fqs_task is created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For rcutorture tests that support fqs operations and set fqs_duration
greater than zero, the fqs_task kthread will be created. but if the
fqs_holdoff is not set, the default value is zero, this cause fqs_task
enter a long-term busy loop and won't voluntarily give up the CPU until
stopped by kthread_stop(). this commit therefore add for fqs_holdoff check
before the fqs_task is created, make sure the fqs_task is created when
the fqs_holdoff is also greater than zero.

Signed-off-by: Zqiang <qiang.zhang1211@xxxxxxxxx>
---
 kernel/rcu/rcutorture.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 83999e57b3ea..9f0e6c1cad44 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -3886,7 +3886,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);
-- 
2.17.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux