[PATCH RFC 0/3] generalize panic_print's dump function to be

Feng Tang posted 3 patches 7 months, 1 week ago
include/linux/panic.h | 12 ++++++++++++
kernel/hung_task.c    | 29 +++++++++++++++-------------
kernel/panic.c        | 44 +++++++++++++++++++++----------------------
kernel/watchdog.c     | 11 +++++++++++
4 files changed, 61 insertions(+), 35 deletions(-)
[PATCH RFC 0/3] generalize panic_print's dump function to be
Posted by Feng Tang 7 months, 1 week ago
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

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

 include/linux/panic.h | 12 ++++++++++++
 kernel/hung_task.c    | 29 +++++++++++++++-------------
 kernel/panic.c        | 44 +++++++++++++++++++++----------------------
 kernel/watchdog.c     | 11 +++++++++++
 4 files changed, 61 insertions(+), 35 deletions(-)

-- 
2.39.5 (Apple Git-154)
Re: [PATCH RFC 0/3] generalize panic_print's dump function to be
Posted by Lance Yang 7 months, 1 week ago
Cc Masami and Waiman

On 2025/5/7 18:43, Feng Tang wrote:
> 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
> 
> 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
> 
>   include/linux/panic.h | 12 ++++++++++++
>   kernel/hung_task.c    | 29 +++++++++++++++-------------
>   kernel/panic.c        | 44 +++++++++++++++++++++----------------------
>   kernel/watchdog.c     | 11 +++++++++++
>   4 files changed, 61 insertions(+), 35 deletions(-)
>