From: Feng Tang <feng.tang@linux.alibaba.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Petr Mladek <pmladek@suse.com>, Lance Yang <ioworker0@gmail.com>,
paulmck@kernel.org, Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org
Cc: Feng Tang <feng.tang@linux.alibaba.com>
Subject: [PATCH 0/3] Enable hung_task and lockup cases to dump system info on demand
Date: Thu, 6 Nov 2025 10:30:29 +0800 [thread overview]
Message-ID: <20251106023032.25875-1-feng.tang@linux.alibaba.com> (raw)
When working on kernel stability issues: panic, task-hung and soft/hard
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, ftrace dump, etc.
panic case already uses sys_info() for this purpose, and has a
'panic_sys_info' sysctl(also support cmdline setup) interface to take
human readable string like "tasks,mem,timers,locks,ftrace,..." to
control what kinds of information is needed. Which is also helpful
to debug task-hung and lockup cases.
So this patchset introduce the similar sys_info sysctl interface for
task-hung and lockup cases.
Please be noted, this is mainly for debugging and the info dumping
could be intrusive, like dumping call stack for all tasks when system
has huge number of tasks, similarly for ftrace dump (we may add
tracing_stop() and tracing_start() around it)
Locally these have been used in our bug chasing for stablility issues
and was helpful.
Andrew suggested a global sys_info knob, and one thought for this is
to have something in sys_info.c:
unsigned long gloabl_si_mask;
void sys_info(unsigned long si_mask)
{
if (!si_mask)
__sys_info(gloabl_si_mask);
else
__sys_info(si_mask);
}
to let caller decide whether to use its own option or the gloabl one.
Please help to review, thanks!
Feng Tang (3):
docs: panic: correct some sys_ifo names in sysctl doc
hung_task: Add hung_task_sys_info sysctl to dump sys info on task-hung
watchdog: add lockup_sys_info sysctl to dump sys info on system lockup
Documentation/admin-guide/sysctl/kernel.rst | 14 ++++++--
kernel/hung_task.c | 39 +++++++++++++++------
kernel/watchdog.c | 21 ++++++++++-
3 files changed, 60 insertions(+), 14 deletions(-)
--
2.43.5
next reply other threads:[~2025-11-06 2:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 2:30 Feng Tang [this message]
2025-11-06 2:30 ` [PATCH 1/3] docs: panic: correct some sys_ifo names in sysctl doc Feng Tang
2025-11-10 16:52 ` Petr Mladek
2025-11-11 14:09 ` Feng Tang
2025-11-06 2:30 ` [PATCH 2/3] hung_task: Add hung_task_sys_info sysctl to dump sys info on task-hung Feng Tang
2025-11-06 3:28 ` Lance Yang
2025-11-06 4:48 ` Feng Tang
2025-11-10 17:55 ` Petr Mladek
2025-11-11 13:37 ` Feng Tang
2025-11-12 11:25 ` Feng Tang
2025-11-12 14:44 ` Petr Mladek
2025-11-13 2:56 ` Feng Tang
2025-11-06 2:30 ` [PATCH 3/3] watchdog: add lockup_sys_info sysctl to dump sys info on system lockup Feng Tang
2025-11-11 13:26 ` Petr Mladek
2025-11-11 14:09 ` 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=20251106023032.25875-1-feng.tang@linux.alibaba.com \
--to=feng.tang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=ioworker0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@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