public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable hung_task and lockup cases to dump system info on demand
@ 2025-11-06  2:30 Feng Tang
  2025-11-06  2:30 ` [PATCH 1/3] docs: panic: correct some sys_ifo names in sysctl doc Feng Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Feng Tang @ 2025-11-06  2:30 UTC (permalink / raw)
  To: Andrew Morton, Petr Mladek, Lance Yang, paulmck, Steven Rostedt,
	linux-kernel
  Cc: Feng Tang

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


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

end of thread, other threads:[~2025-11-13  2:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06  2:30 [PATCH 0/3] Enable hung_task and lockup cases to dump system info on demand Feng Tang
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

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