Re: [PATCH v2 2/4] hung_task: Add hung_task_sys_info sysctl to dump sys info on task-hung
From: Feng Tang
Date: Sun Nov 16 2025 - 02:16:42 EST
On Fri, Nov 14, 2025 at 04:36:39PM +0100, Petr Mladek wrote:
> On Thu 2025-11-13 19:10:37, Feng Tang wrote:
> > When task-hung happens, developers may need different kinds of system
> > information (call-stacks, memory info, locks, etc.) to help debugging.
> >
> > Add 'hung_task_sys_info' sysctl knob to take human readable string like
> > "tasks,mem,timers,locks,ftrace,...", and when task-hung happens, all
> > requested information will be dumped. (refer kernel/sys_info.c for more
> > details).
> >
> > Meanwhile, the newly introduced sys_info() call is used to unify some
> > existing info-dumping knobs.
> >
> > Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> > Signed-off-by: Feng Tang <feng.tang@xxxxxxxxxxxxxxxxx>
>
> It would have been better to split the refactoring (moving some logic
> from check_hung_task()) into a separate patch.
Yes, it would be cleaner to have a functional patch and a clenup one.
Will pay more attention in the future.
> But the result looks good. Feel free to use:
>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
Thank you!
- Feng