mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 rcu 5/9] torture: Move torture_onoff() timeouts to hrtimers
Date: Mon, 17 Jul 2023 11:20:38 -0700	[thread overview]
Message-ID: <20230717182042.1098651-5-paulmck@kernel.org> (raw)
In-Reply-To: <bca717ca-a83a-4540-80ec-732c12623d2d@paulmck-laptop>

In order to gain better race coverage, move the CPU-hotplug-related
timed waits in torture_onoff() to torture_hrtimeout_jiffies().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/torture.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/torture.c b/kernel/torture.c
index 836fefa44373..fc873116a399 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -357,12 +357,12 @@ torture_onoff(void *arg)
 
 	if (onoff_holdoff > 0) {
 		VERBOSE_TOROUT_STRING("torture_onoff begin holdoff");
-		schedule_timeout_interruptible(onoff_holdoff);
+		torture_hrtimeout_jiffies(onoff_holdoff, &rand);
 		VERBOSE_TOROUT_STRING("torture_onoff end holdoff");
 	}
 	while (!torture_must_stop()) {
 		if (disable_onoff_at_boot && !rcu_inkernel_boot_has_ended()) {
-			schedule_timeout_interruptible(HZ / 10);
+			torture_hrtimeout_jiffies(HZ / 10, &rand);
 			continue;
 		}
 		cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
@@ -372,7 +372,7 @@ torture_onoff(void *arg)
 			torture_online(cpu,
 				       &n_online_attempts, &n_online_successes,
 				       &sum_online, &min_online, &max_online);
-		schedule_timeout_interruptible(onoff_interval);
+		torture_hrtimeout_jiffies(onoff_interval, &rand);
 	}
 
 stop:
-- 
2.40.1


  parent reply	other threads:[~2023-07-17 18:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 18:20 [PATCH rcu 0/9] Torture-test updates for v6.6 Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 1/9] rcutorture: Dump grace-period state upon rtort_pipe_count incidents Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 2/9] torture: Support randomized shuffling for proxy exec testing Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 3/9] torture: Add lock_torture_writer_fifo module param Paul E. McKenney
2023-07-28  3:22   ` Paul E. McKenney
2023-07-28  3:22     ` [PATCH rcu 1/2] torture: Add a kthread-creation callback to _torture_create_kthread() Paul E. McKenney
2023-08-05 22:44       ` Joel Fernandes
2023-08-08  3:26       ` John Stultz
2023-07-28  3:22     ` [PATCH rcu 2/2] torture: Add lock_torture writer_fifo module parameter Paul E. McKenney
2023-08-08  3:27       ` John Stultz
2023-08-08  4:00         ` Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 4/9] torture: Make torture_hrtimeout_*() use TASK_IDLE Paul E. McKenney
2023-07-17 18:20 ` Paul E. McKenney [this message]
2023-07-17 18:20 ` [PATCH rcu 6/9] torture: Move torture_shuffle() timeouts to hrtimers Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 7/9] torture: Move stutter_wait() " Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 8/9] torture: Stop right-shifting torture_random() return values Paul E. McKenney
2023-07-17 18:20 ` [PATCH rcu 9/9] rcutorture: " 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=20230717182042.1098651-5-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®