From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH 4/7] rcutorture: Suppress "Writer stall state" reports during boot
Date: Fri, 15 Aug 2025 17:08:34 -0700 [thread overview]
Message-ID: <20250816000837.2622858-4-paulmck@kernel.org> (raw)
In-Reply-To: <8758bcc6-901f-4828-b2fc-aa9f90e85451@paulmck-laptop>
When rcutorture is running on only the one boot-time CPU while that CPU
is busy invoking initcall() functions, the added load is quite likely to
unduly delay the RCU grace-period kthread, rcutorture readers, and much
else besides. This can result in rcu_torture_stats_print() reporting
rcutorture writer stalls, which are not really a bug in that environment.
After all, one CPU can only do so much.
This commit therefore suppresses rcutorture writer stalls while the
kernel is booting, that is, while rcu_inkernel_boot_has_ended() continues
returning false.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/rcu/rcutorture.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7a893d51d02b6a..49e048da4f6810 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2756,7 +2756,8 @@ rcu_torture_stats_print(void)
cur_ops->stats();
if (rtcv_snap == rcu_torture_current_version &&
rcu_access_pointer(rcu_torture_current) &&
- !rcu_stall_is_suppressed()) {
+ !rcu_stall_is_suppressed() &&
+ rcu_inkernel_boot_has_ended()) {
int __maybe_unused flags = 0;
unsigned long __maybe_unused gp_seq = 0;
--
2.40.1
next prev parent reply other threads:[~2025-08-16 0:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 0:08 [PATCH 0/7] RCU torture-test updates for v6.18 Paul E. McKenney
2025-08-16 0:08 ` [PATCH 1/7] rcutorture: Fix jitter.sh spin time Paul E. McKenney
2025-08-16 0:08 ` [PATCH 2/7] torture: Add --do-normal parameter to torture.sh help text Paul E. McKenney
2025-08-16 0:08 ` [PATCH 3/7] torture: Announce kernel boot status at torture-test startup Paul E. McKenney
2025-08-16 0:08 ` Paul E. McKenney [this message]
2025-08-16 0:08 ` [PATCH 5/7] rcutorture: Delay rcutorture readers and writers until boot completes Paul E. McKenney
2025-08-16 0:08 ` [PATCH 6/7] torture: Delay CPU-hotplug operations " Paul E. McKenney
2025-08-16 0:08 ` [PATCH 7/7] rcutorture: Delay forward-progress testing " Paul E. McKenney
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=20250816000837.2622858-4-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®