From: Feng Tang <feng.tang@linux.alibaba.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Lance Yang <lance.yang@linux.dev>,
linux-kernel@vger.kernel.org
Cc: mhiramat@kernel.org, llong@redhat.com,
Feng Tang <feng.tang@linux.alibaba.com>
Subject: [PATCH v1 0/3] generalize panic_print's dump function to be used by other kernel parts
Date: Sun, 11 May 2025 16:52:51 +0800 [thread overview]
Message-ID: <20250511085254.61446-1-feng.tang@linux.alibaba.com> (raw)
When working on kernel stability issues, panic, task-hung and
software/hardware lockup are frequently met. And to debug them, user
may need lots of system information at that time, like task call stacks,
lock info, memory info etc.
panic case already has panic_print_sys_info() for this purpose, and has
a 'panic_print' bitmask to control what kinds of information is needed,
which is also helpful to debug other task-hung and lockup cases.
So this patchset extract the function out, and make it usable for other
cases which also need system info for debugging.
Locally these have been used in our bug chasing for stablility issues
and was helpful.
Please help to review, thanks!
- Feng
Changelog:
Since RFC:
* Don't print all cpu backtrace if 'sysctl_hung_task_all_cpu_backtracemay'
is 'false' (Lance Yang)
* Change the name of 2 new kernel control knob to have 'mask' inside, and
add kernel document and code comments for them (Lance Yang)
* Make the sys_show_info() support printk msg replay and all CPU backtrace.
Feng Tang (3):
kernel/panic: generalize panic_print's function to show sys info
kernel/hung_task: add option to dump system info when hung task
detected
kernel/watchdog: add option to dump system info when system is locked
up
.../admin-guide/kernel-parameters.txt | 10 ++++
include/linux/panic.h | 11 +++++
kernel/hung_task.c | 42 ++++++++++++-----
kernel/panic.c | 47 ++++++++++---------
kernel/watchdog.c | 20 ++++++++
5 files changed, 95 insertions(+), 35 deletions(-)
--
2.39.5 (Apple Git-154)
next reply other threads:[~2025-05-11 8:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-11 8:52 Feng Tang [this message]
2025-05-11 8:52 ` [PATCH v1 1/3] kernel/panic: generalize panic_print's function to show sys info Feng Tang
2025-05-13 9:57 ` Petr Mladek
2025-05-13 13:23 ` Feng Tang
2025-05-15 10:32 ` Petr Mladek
2025-05-15 11:28 ` Lance Yang
2025-05-16 5:38 ` Feng Tang
2025-05-16 13:39 ` Lance Yang
2025-05-21 5:31 ` Feng Tang
2025-06-10 15:44 ` Petr Mladek
2025-06-11 13:43 ` Feng Tang
2025-05-11 8:52 ` [PATCH v1 2/3] kernel/hung_task: add option to dump system info when hung task detected Feng Tang
2025-05-11 8:52 ` [PATCH v1 3/3] kernel/watchdog: add option to dump system info when system is locked up Feng Tang
2025-05-12 1:46 ` [PATCH v1 0/3] generalize panic_print's dump function to be used by other kernel parts Andrew Morton
2025-05-12 3:14 ` Feng Tang
2025-05-12 8:23 ` Lance Yang
2025-05-12 9:31 ` Feng Tang
2025-05-13 13:27 ` Petr Mladek
2025-05-13 17:09 ` Paul E. McKenney
2025-05-14 3:33 ` Feng Tang
2025-05-14 13:55 ` Paul E. McKenney
2025-05-14 3:22 ` 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=20250511085254.61446-1-feng.tang@linux.alibaba.com \
--to=feng.tang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=llong@redhat.com \
--cc=mhiramat@kernel.org \
--cc=pmladek@suse.com \
--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
all inboxes | Powered by JetHome®