From: "Neeraj Upadhyay (AMD)" <neeraj.iitr10@gmail.com>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, paulmck@kernel.org, Neeraj.Upadhyay@amd.com,
Zqiang <qiang.zhang1211@gmail.com>,
Neeraj Upadhyay <neeraj.iitr10@gmail.com>
Subject: [PATCH rcu 4/4] rcutorture: Add fqs_holdoff check before fqs_task is created
Date: Tue, 12 Dec 2023 23:04:14 +0530 [thread overview]
Message-ID: <20231212173414.11602-4-neeraj.iitr10@gmail.com> (raw)
In-Reply-To: <20231212173334.GA11572@neeraj.linux>
From: Zqiang <qiang.zhang1211@gmail.com>
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>
---
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 30fc9d34e329..a0b2520bd32b 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -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);
--
2.40.1
prev parent reply other threads:[~2023-12-12 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 17:33 [PATCH rcu 0/4] RCU/lock torture updates for v6.8 Neeraj Upadhyay (AMD)
2023-12-12 17:34 ` [PATCH rcu 1/4] locktorture: Increase Hamming distance between call_rcu_chain and rcu_call_chains Neeraj Upadhyay (AMD)
2023-12-12 17:34 ` [PATCH rcu 2/4] rcutorture: add nolibc init support for mips, ppc and rv64 Neeraj Upadhyay (AMD)
2023-12-12 17:34 ` [PATCH rcu 3/4] rcutorture: Add mid-sized stall to TREE07 Neeraj Upadhyay (AMD)
2023-12-12 17:34 ` Neeraj Upadhyay (AMD) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212173414.11602-4-neeraj.iitr10@gmail.com \
--to=neeraj.iitr10@gmail.com \
--cc=Neeraj.Upadhyay@amd.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).