linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Feng Tang <feng.tang@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Lance Yang <lance.yang@linux.dev>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-kernel@vger.kernel.org, paulmck@kernel.org,
	john.ogness@linutronix.de
Subject: Re: [PATCH V2 4/5] panic: add 'panic_sys_info=' setup option for sysctl and kernel cmdline
Date: Mon, 23 Jun 2025 17:04:46 +0200	[thread overview]
Message-ID: <aFltDlSKKCv3Cito@pathway.suse.cz> (raw)
In-Reply-To: <20250616010840.38258-5-feng.tang@linux.alibaba.com>

On Mon 2025-06-16 09:08:39, Feng Tang wrote:
> Add 'panic_sys_info=' setup which expects string like "tasks,mem,lock,...".

This patch actually adds also the sysctl interface. It should be
mentioned in the "Subject" and here.

That said, it might be better to add the sysctl interface in
the previous patch and add just the setup() here.

> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4541,6 +4541,19 @@
>  			Use this option carefully, maybe worth to setup a
>  			bigger log buffer with "log_buf_len" along with this.
>  
> +	panic_sys_info=


> +			String of subsystem info to be dumped on panic.

I am not a native speaker but I have troubles to parse the above
sentence. See below.

> +			It expects string of comma-separated words like
> +			"tasks,mem,timer,...", which is a human readable string
> +			version of 'panic_print':
> +			tasks: print all tasks info
> +			mem: print system memory info
> +			timer: print timer info
> +			lock: print locks info if CONFIG_LOCKDEP is on
> +			ftrace: print ftrace buffer
> +			all_bt: print all CPUs backtrace (if available in the arch)
> +			blocked_tasks: print only tasks in uninterruptible (blocked) state

This blob is hard to parse. I suggest to replace it with something
like:

<proposal>
	panic_sys_info= A comma separated list of extra information to be dumped
			on panic.
			Format: val[,val...]
			Where @val can be any of the following:

			tasks:		print all tasks info
			mem:		print system memory info
			timers:		print timers info
			locks:		print locks info if CONFIG_LOCKDEP is on
			ftrace:		print ftrace buffer
			all_bt:		print all CPUs backtrace (if available in the arch)
			blocked_tasks:	print only tasks in uninterruptible (blocked) state

			This is a human readable alternative to the 'panic_print' option.
</proposal>

> +
>  	parkbd.port=	[HW] Parallel port number the keyboard adapter is
>  			connected to, default is 0.
>  			Format: <parport#>
> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> index dd49a89a62d3..2013afd98605 100644
> --- a/Documentation/admin-guide/sysctl/kernel.rst
> +++ b/Documentation/admin-guide/sysctl/kernel.rst
> @@ -899,6 +899,24 @@ So for example to print tasks and memory info on panic, user can::
>    echo 3 > /proc/sys/kernel/panic_print
>  
>  
> +panic_sys_info
> +==============
> +
> +String of subsystem info to be dumped on panic. It expects string of

Same here.

> +comma-separated words like "tasks,mem,timer,...", which is a human
> +readable string version of 'panic_print':

I would replace it with:

<proposal>
A comma separated list of extra information to be dumped on panic,
for example, "tasks,mem,timers,...".  It is a human readable alternative
to 'panic_print'. Possible values are:
</proposal>

> +
> +=============   ===================================================
> +tasks           print all tasks info
> +mem             print system memory info
> +timer           print timer info
> +lock            print locks info if CONFIG_LOCKDEP is on
> +ftrace          print ftrace buffer
> +all_bt          print all CPUs backtrace (if available in the arch)
> +blocked_tasks   print only tasks in uninterruptible (blocked) state
> +=============   ===================================================
> +
> +
>  panic_on_rcu_stall
>  ==================

The rest looks good.

Best Regards,
Petr

  reply	other threads:[~2025-06-23 15:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  1:08 [PATCH V2 0/5] generalize panic_print's dump function to be used by other kernel parts Feng Tang
2025-06-16  1:08 ` [PATCH V2 1/5] panic: clean up code for console replay Feng Tang
2025-06-20 14:19   ` Petr Mladek
2025-06-16  1:08 ` [PATCH V2 2/5] panic: generalize panic_print's function to show sys info Feng Tang
2025-06-20 15:21   ` Petr Mladek
2025-06-23  3:07     ` Feng Tang
2025-06-16  1:08 ` [PATCH V2 3/5] sys_info: add help to translate sys_info string to bitmap Feng Tang
2025-06-16  4:25   ` kernel test robot
2025-06-16 15:08     ` Feng Tang
2025-06-23 14:04   ` Petr Mladek
2025-06-24  1:48     ` Feng Tang
2025-06-16  1:08 ` [PATCH V2 4/5] panic: add 'panic_sys_info=' setup option for sysctl and kernel cmdline Feng Tang
2025-06-23 15:04   ` Petr Mladek [this message]
2025-06-24  1:55     ` Feng Tang
2025-06-16  1:08 ` [PATCH V2 5/5] panic: add note that panic_print interface is deprecated Feng Tang
2025-06-16  1:45   ` Lance Yang
2025-06-16  2:39     ` Feng Tang
2025-06-23 15:13     ` Petr Mladek
2025-06-23 15:22   ` Petr Mladek
2025-06-24  1:58     ` Feng Tang
2025-06-25  9:30     ` Feng Tang

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=aFltDlSKKCv3Cito@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=feng.tang@linux.alibaba.com \
    --cc=john.ogness@linutronix.de \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@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;
as well as URLs for NNTP newsgroup(s).