public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.3 1/3] refscale: Move shutdown from wait_event() to wait_event_idle()
@ 2023-04-29  1:58 Sasha Levin
  2023-04-29  1:58 ` [PATCH AUTOSEL 6.3 2/3] selftests: cgroup: Add 'malloc' failures checks in test_memcontrol Sasha Levin
  2023-04-29  1:58 ` [PATCH AUTOSEL 6.3 3/3] rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access Sasha Levin
  0 siblings, 2 replies; 4+ messages in thread
From: Sasha Levin @ 2023-04-29  1:58 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Paul E. McKenney, Boqun Feng, Sasha Levin, dave, josh, frederic,
	quic_neeraju, rcu

From: "Paul E. McKenney" <paulmck@kernel.org>

[ Upstream commit 6bc6e6b27524304aadb9c04611ddb1c84dd7617a ]

The ref_scale_shutdown() kthread/function uses wait_event() to wait for
the refscale test to complete.  However, although the read-side tests
are normally extremely fast, there is no law against specifying a very
large value for the refscale.loops module parameter or against having
a slow read-side primitive.  Either way, this might well trigger the
hung-task timeout.

This commit therefore replaces those wait_event() calls with calls to
wait_event_idle(), which do not trigger the hung-task timeout.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/rcu/refscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index afa3e1a2f6902..1970ce5f22d40 100644
--- a/kernel/rcu/refscale.c
+++ b/kernel/rcu/refscale.c
@@ -1031,7 +1031,7 @@ ref_scale_cleanup(void)
 static int
 ref_scale_shutdown(void *arg)
 {
-	wait_event(shutdown_wq, shutdown_start);
+	wait_event_idle(shutdown_wq, shutdown_start);
 
 	smp_mb(); // Wake before output.
 	ref_scale_cleanup();
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 6.3 1/3] refscale: Move shutdown from wait_event() to wait_event_idle()
@ 2023-07-02 19:38 Sasha Levin
  2023-07-02 19:38 ` [PATCH AUTOSEL 6.3 3/3] rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2023-07-02 19:38 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Paul E. McKenney, Boqun Feng, Sasha Levin, dave, josh, frederic,
	quic_neeraju, joel, rcu

From: "Paul E. McKenney" <paulmck@kernel.org>

[ Upstream commit 6bc6e6b27524304aadb9c04611ddb1c84dd7617a ]

The ref_scale_shutdown() kthread/function uses wait_event() to wait for
the refscale test to complete.  However, although the read-side tests
are normally extremely fast, there is no law against specifying a very
large value for the refscale.loops module parameter or against having
a slow read-side primitive.  Either way, this might well trigger the
hung-task timeout.

This commit therefore replaces those wait_event() calls with calls to
wait_event_idle(), which do not trigger the hung-task timeout.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/rcu/refscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index afa3e1a2f6902..1970ce5f22d40 100644
--- a/kernel/rcu/refscale.c
+++ b/kernel/rcu/refscale.c
@@ -1031,7 +1031,7 @@ ref_scale_cleanup(void)
 static int
 ref_scale_shutdown(void *arg)
 {
-	wait_event(shutdown_wq, shutdown_start);
+	wait_event_idle(shutdown_wq, shutdown_start);
 
 	smp_mb(); // Wake before output.
 	ref_scale_cleanup();
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-02 19:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-29  1:58 [PATCH AUTOSEL 6.3 1/3] refscale: Move shutdown from wait_event() to wait_event_idle() Sasha Levin
2023-04-29  1:58 ` [PATCH AUTOSEL 6.3 2/3] selftests: cgroup: Add 'malloc' failures checks in test_memcontrol Sasha Levin
2023-04-29  1:58 ` [PATCH AUTOSEL 6.3 3/3] rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2023-07-02 19:38 [PATCH AUTOSEL 6.3 1/3] refscale: Move shutdown from wait_event() to wait_event_idle() Sasha Levin
2023-07-02 19:38 ` [PATCH AUTOSEL 6.3 3/3] rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox