diff mbox series

[6/6] rcu: Allow up to five minutes expedited RCU CPU stall-warning timeouts

Message ID 20230105005126.1772294-6-paulmck@kernel.org (mailing list archive)
State Accepted
Commit 0d49d9123dcf41f754d4b26025035f7ace6a0336
Headers show
Series RCU CPU stall-warning updates for v6.3 | expand

Commit Message

Paul E. McKenney Jan. 5, 2023, 12:51 a.m. UTC
The maximum value of RCU CPU stall-warning timeouts has historically been
five minutes (300 seconds).  However, the recently introduced expedited
RCU CPU stall-warning timeout is instead limited to 21 seconds.  This
causes problems for CI/fuzzing services such as syzkaller by obscuring
the issue in question with expedited RCU CPU stall-warning timeout splats.

This commit therefore sets the RCU_EXP_CPU_STALL_TIMEOUT Kconfig options
upper bound to 300000 milliseconds, which is 300 seconds and 5 minutes.

[ paulmck: Apply feedback from Hillf Danton. ]

Reported-by: Dave Chinner <david@fromorbit.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/Kconfig.debug | 2 +-
 kernel/rcu/tree_stall.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Geert Uytterhoeven Jan. 9, 2023, 10:10 a.m. UTC | #1
Hi Paul,

Thanks for your patch, which is now commit 0d49d9123dcf41f7 ("rcu:
Allow up to five minutes expedited RCU CPU stall-warning timeouts")
in next-20230109.

On Thu, Jan 5, 2023 at 2:10 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> The maximum value of RCU CPU stall-warning timeouts has historically been
> five minutes (300 seconds).  However, the recently introduced expedited
> RCU CPU stall-warning timeout is instead limited to 21 seconds.  This
> causes problems for CI/fuzzing services such as syzkaller by obscuring
> the issue in question with expedited RCU CPU stall-warning timeout splats.
>
> This commit therefore sets the RCU_EXP_CPU_STALL_TIMEOUT Kconfig options
> upper bound to 300000 milliseconds, which is 300 seconds and 5 minutes.

s/and/or/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Paul E. McKenney Jan. 9, 2023, 3:13 p.m. UTC | #2
On Mon, Jan 09, 2023 at 11:10:10AM +0100, Geert Uytterhoeven wrote:
> Hi Paul,
> 
> Thanks for your patch, which is now commit 0d49d9123dcf41f7 ("rcu:
> Allow up to five minutes expedited RCU CPU stall-warning timeouts")
> in next-20230109.
> 
> On Thu, Jan 5, 2023 at 2:10 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> > The maximum value of RCU CPU stall-warning timeouts has historically been
> > five minutes (300 seconds).  However, the recently introduced expedited
> > RCU CPU stall-warning timeout is instead limited to 21 seconds.  This
> > causes problems for CI/fuzzing services such as syzkaller by obscuring
> > the issue in question with expedited RCU CPU stall-warning timeout splats.
> >
> > This commit therefore sets the RCU_EXP_CPU_STALL_TIMEOUT Kconfig options
> > upper bound to 300000 milliseconds, which is 300 seconds and 5 minutes.
> 
> s/and/or/

Good eyes!  I will apply with attribution on my next rebase.

							Thanx, Paul
diff mbox series

Patch

diff --git a/kernel/rcu/Kconfig.debug b/kernel/rcu/Kconfig.debug
index 49da904df6aa6..2984de629f749 100644
--- a/kernel/rcu/Kconfig.debug
+++ b/kernel/rcu/Kconfig.debug
@@ -82,7 +82,7 @@  config RCU_CPU_STALL_TIMEOUT
 config RCU_EXP_CPU_STALL_TIMEOUT
 	int "Expedited RCU CPU stall timeout in milliseconds"
 	depends on RCU_STALL_COMMON
-	range 0 21000
+	range 0 300000
 	default 0
 	help
 	  If a given expedited RCU grace period extends more than the
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index f360894f5599d..b10b8349bb2a4 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -39,7 +39,7 @@  int rcu_exp_jiffies_till_stall_check(void)
 	// CONFIG_RCU_EXP_CPU_STALL_TIMEOUT, so check the allowed range.
 	// The minimum clamped value is "2UL", because at least one full
 	// tick has to be guaranteed.
-	till_stall_check = clamp(msecs_to_jiffies(cpu_stall_timeout), 2UL, 21UL * HZ);
+	till_stall_check = clamp(msecs_to_jiffies(cpu_stall_timeout), 2UL, 300UL * HZ);
 
 	if (cpu_stall_timeout && jiffies_to_msecs(till_stall_check) != cpu_stall_timeout)
 		WRITE_ONCE(rcu_exp_cpu_stall_timeout, jiffies_to_msecs(till_stall_check));