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 6/9] torture: Move torture_shuffle() timeouts to hrtimers
Date: Mon, 17 Jul 2023 11:20:39 -0700	[thread overview]
Message-ID: <20230717182042.1098651-6-paulmck@kernel.org> (raw)
In-Reply-To: <bca717ca-a83a-4540-80ec-732c12623d2d@paulmck-laptop>

In order to gain better race coverage, move the CPU-migration timed
waits in torture_shuffle() to torture_hrtimeout_jiffies().

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

diff --git a/kernel/torture.c b/kernel/torture.c
index fc873116a399..3ab4930b9fdb 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -560,9 +560,11 @@ static void torture_shuffle_tasks(void)
  */
 static int torture_shuffle(void *arg)
 {
+	DEFINE_TORTURE_RANDOM(rand);
+
 	VERBOSE_TOROUT_STRING("torture_shuffle task started");
 	do {
-		schedule_timeout_interruptible(shuffle_interval);
+		torture_hrtimeout_jiffies(shuffle_interval, &rand);
 		torture_shuffle_tasks();
 		torture_shutdown_absorb("torture_shuffle");
 	} while (!torture_must_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 ` [PATCH rcu 5/9] torture: Move torture_onoff() timeouts to hrtimers Paul E. McKenney
2023-07-17 18:20 ` Paul E. McKenney [this message]
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-6-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®