Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] docs: Document panic_on_rcu_stall default behavior
@ 2026-05-09  9:12 Kunwu Chan
  2026-05-10 19:54 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Kunwu Chan @ 2026-05-09  9:12 UTC (permalink / raw)
  To: corbet, skhan; +Cc: linux-doc, linux-kernel, paulmck, gustavold, Kunwu Chan

From: Kunwu Chan <kunwu.chan@gmail.com>

Commit ab875b3e179f ("rcu: Add BOOTPARAM_RCU_STALL_PANIC
Kconfig option") made the default value of
kernel.panic_on_rcu_stall depend on
CONFIG_BOOTPARAM_RCU_STALL_PANIC.

Document this in kernel.rst

Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
---
 Documentation/admin-guide/sysctl/kernel.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index c6994e55d141..99598a83f830 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -948,6 +948,10 @@ panic_on_rcu_stall
 When set to 1, calls panic() after RCU stall detection messages. This
 is useful to define the root cause of RCU stalls using a vmcore.
 
+The default value can be configured at build time via
+``CONFIG_BOOTPARAM_RCU_STALL_PANIC``. Runtime updates to this sysctl
+always override the built-in default.
+
 = ============================================================
 0 Do not panic() when RCU stall takes place, default behavior.
 1 panic() after printing RCU stall messages.
-- 
2.43.0


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

* Re: [PATCH] docs: Document panic_on_rcu_stall default behavior
  2026-05-09  9:12 [PATCH] docs: Document panic_on_rcu_stall default behavior Kunwu Chan
@ 2026-05-10 19:54 ` Paul E. McKenney
  2026-05-12  8:08   ` Kunwu Chan
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2026-05-10 19:54 UTC (permalink / raw)
  To: Kunwu Chan; +Cc: corbet, skhan, linux-doc, linux-kernel, gustavold, Kunwu Chan

On Sat, May 09, 2026 at 05:12:14PM +0800, Kunwu Chan wrote:
> From: Kunwu Chan <kunwu.chan@gmail.com>
> 
> Commit ab875b3e179f ("rcu: Add BOOTPARAM_RCU_STALL_PANIC
> Kconfig option") made the default value of
> kernel.panic_on_rcu_stall depend on
> CONFIG_BOOTPARAM_RCU_STALL_PANIC.
> 
> Document this in kernel.rst
> 
> Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>

This commit depends on the commit you call out above, which, given Linus
Torvalds's reaction, is unlikely to make it into mainline.  :-(

A likely workaround is to use the existing sysctl kernel boot parameter,
as in: "sysctl.kernel.panic_on_rcu_stall=1".

This can also be embedded into the kernel image using the bootconfig
facility.  To do this, build your kernel with the following Kconfig
options:

	CONFIG_BOOT_CONFIG=y
	CONFIG_BOOT_CONFIG_FORCE=y
	CONFIG_BOOT_CONFIG_EMBED=y
	CONFIG_BOOT_CONFIG_EMBED_FILE=".bootconfig"

Then create your ".bootconfig" file in the top-level directory of your
Linux-kernel source tree:

	kernel {
		sysctl.kernel.panic_on_rcu_stall=1
	}

You can also pass parameters to the "init" process by adding an "init"
stanza to your .bootconfig file.  See the Linux-kernel bootconfig
documentation for more information:

	Documentation/admin-guide/bootconfig.rst

							Thanx, Paul

> ---
>  Documentation/admin-guide/sysctl/kernel.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> index c6994e55d141..99598a83f830 100644
> --- a/Documentation/admin-guide/sysctl/kernel.rst
> +++ b/Documentation/admin-guide/sysctl/kernel.rst
> @@ -948,6 +948,10 @@ panic_on_rcu_stall
>  When set to 1, calls panic() after RCU stall detection messages. This
>  is useful to define the root cause of RCU stalls using a vmcore.
>  
> +The default value can be configured at build time via
> +``CONFIG_BOOTPARAM_RCU_STALL_PANIC``. Runtime updates to this sysctl
> +always override the built-in default.
> +
>  = ============================================================
>  0 Do not panic() when RCU stall takes place, default behavior.
>  1 panic() after printing RCU stall messages.
> -- 
> 2.43.0
> 

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

* Re: [PATCH] docs: Document panic_on_rcu_stall default behavior
  2026-05-10 19:54 ` Paul E. McKenney
@ 2026-05-12  8:08   ` Kunwu Chan
  0 siblings, 0 replies; 3+ messages in thread
From: Kunwu Chan @ 2026-05-12  8:08 UTC (permalink / raw)
  To: paulmck; +Cc: corbet, skhan, linux-doc, linux-kernel, gustavold, Kunwu Chan

May 11, 2026 at 3:54 AM, "Paul E. McKenney" <paulmck@kernel.org mailto:paulmck@kernel.org?to=%22Paul%20E.%20McKenney%22%20%3Cpaulmck%40kernel.org%3E > wrote:


> 
> On Sat, May 09, 2026 at 05:12:14PM +0800, Kunwu Chan wrote:
> 
> > 
> > From: Kunwu Chan <kunwu.chan@gmail.com>
> >  
> >  Commit ab875b3e179f ("rcu: Add BOOTPARAM_RCU_STALL_PANIC
> >  Kconfig option") made the default value of
> >  kernel.panic_on_rcu_stall depend on
> >  CONFIG_BOOTPARAM_RCU_STALL_PANIC.
> >  
> >  Document this in kernel.rst
> >  
> >  Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
> > 
> This commit depends on the commit you call out above, which, given Linus
> Torvalds's reaction, is unlikely to make it into mainline. :-(
> 
> A likely workaround is to use the existing sysctl kernel boot parameter,
> as in: "sysctl.kernel.panic_on_rcu_stall=1".
> 
> This can also be embedded into the kernel image using the bootconfig
> facility. To do this, build your kernel with the following Kconfig
> options:
> 
>  CONFIG_BOOT_CONFIG=y
>  CONFIG_BOOT_CONFIG_FORCE=y
>  CONFIG_BOOT_CONFIG_EMBED=y
>  CONFIG_BOOT_CONFIG_EMBED_FILE=".bootconfig"
> 
Hi Paul,

Thank you for the detailed explanation and the alternative solutions.
I wasn't aware of the feedback from Linus regarding the dependency commit. 
Since it's unlikely to be merged into mainline, :-(
it makes sense to drop this documentation patch as well.

> Then create your ".bootconfig" file in the top-level directory of your
> Linux-kernel source tree:
> 
>  kernel {
>  sysctl.kernel.panic_on_rcu_stall=1
>  }
> 
> You can also pass parameters to the "init" process by adding an "init"
> stanza to your .bootconfig file. See the Linux-kernel bootconfig
> documentation for more information:
> 
>  Documentation/admin-guide/bootconfig.rst
> 
I will look into the bootconfig and sysctl approaches you suggested. 
Thanks again for pointing me in the right direction!

>  Thanx, Paul
> 

Best regards,
Kunwu Chan
> > 
> > ---
> >  Documentation/admin-guide/sysctl/kernel.rst | 4 ++++
> >  1 file changed, 4 insertions(+)
> >  
> >  diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> >  index c6994e55d141..99598a83f830 100644
> >  --- a/Documentation/admin-guide/sysctl/kernel.rst
> >  +++ b/Documentation/admin-guide/sysctl/kernel.rst
> >  @@ -948,6 +948,10 @@ panic_on_rcu_stall
> >  When set to 1, calls panic() after RCU stall detection messages. This
> >  is useful to define the root cause of RCU stalls using a vmcore.
> >  
> >  +The default value can be configured at build time via
> >  +``CONFIG_BOOTPARAM_RCU_STALL_PANIC``. Runtime updates to this sysctl
> >  +always override the built-in default.
> >  +
> >  = ============================================================
> >  0 Do not panic() when RCU stall takes place, default behavior.
> >  1 panic() after printing RCU stall messages.
> >  -- 
> >  2.43.0
> >
>

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

end of thread, other threads:[~2026-05-12  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09  9:12 [PATCH] docs: Document panic_on_rcu_stall default behavior Kunwu Chan
2026-05-10 19:54 ` Paul E. McKenney
2026-05-12  8:08   ` Kunwu Chan

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