mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhouzhouyi@gmail.com
To: paulmck@kernel.org, rcu@vger.kernel.org,
	linux-kernel@vger.kernel.org, lance@osuosl.org
Cc: Zhouyi Zhou <zhouzhouyi@gmail.com>
Subject: [PATCH V2] rcu/torture replace wait_event with wait_event_idle
Date: Tue,  2 May 2023 08:01:41 +0800	[thread overview]
Message-ID: <1682985701-19914-1-git-send-email-zhouzhouyi@gmail.com> (raw)

From: Zhouyi Zhou <zhouzhouyi@gmail.com>

In kfree_rcu_test, kfree_scale_shutdown will be detected as hung task
if kfree_loops is too big. Replace wait_event with wait_event_idle
to avoid false positive.

Tested in the PPC VM of Open Source Lab of Oregon State University.

Suggested-by: Paul E. McKenney <paulmck@kernel.org>    
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>                    
---
 kernel/rcu/rcuscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 91fb5905a008..d99c586939d1 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -771,7 +771,7 @@ kfree_scale_cleanup(void)
 static int
 kfree_scale_shutdown(void *arg)
 {
-	wait_event(shutdown_wq,
+	wait_event_idle(shutdown_wq,
 		   atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads);
 
 	smp_mb(); /* Wake before output. */
-- 
2.34.1


             reply	other threads:[~2023-05-02  0:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  0:01 zhouzhouyi [this message]
2023-05-02 13:40 ` Paul E. McKenney
2023-05-02 13:50   ` Zhouyi Zhou

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=1682985701-19914-1-git-send-email-zhouzhouyi@gmail.com \
    --to=zhouzhouyi@gmail.com \
    --cc=lance@osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.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®