Re: [PATCH 1/2] hung_task: Reset warning budget when problem gets resolved

From: Aaron Tomlin

Date: Tue Aug 04 2026 - 10:43:26 EST


On Tue, Aug 04, 2026 at 10:24:01AM +0800, Lance Yang wrote:
> On 2026/8/4 08:15, Aaron Tomlin wrote:
> > From: Petr Mladek <pmladek@xxxxxxxx>
> >
> > sysctl_hung_task_warnings counts how many hung tasks are reported.
> > The watchdog does not report anything once the limit is reached.
> > Currently, this budget is decremented permanently, meaning the kernel is
> > left blind to subsequent hung tasks even after the original issue resolves.
> >
> > Keep the global sysctl_hung_task_warnings intact, and instead decrement
> > a copy (hung_task_warnings_printed) when warnings are printed. Reset
> > the copy back to the configured sysctl_hung_task_warnings limit once the
> > problem on the system gets resolved and check_hung_uninterruptible_tasks()
> > detects no hung tasks in a check interval.
> >
> > Also keep the copy updated when the global sysctl_hung_task_warnings
> > value is updated via sysctl, and update documentation to reflect
> > the new behavior.
> >
> > Assisted-by: gemini-3.5-flash
> > Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
>
> Was a bit surprised not to see any tag from you here. I’d assumed you’d
> be taking this through testing and spinning v7, so I expected your SoB +
> Suggested-by Petr.
>
> Keeping both SoBs works too; either way, you’ve definitely earned yours
> here.
>
> Assisted-by: gemini-3.5-flash
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
>
> Same goes for patch #02, btw :)
>
> Thanks, Lance

Hi Lance,

Thank you.

I will prepare a v7 with the above. Also, include your "Reviewed-by:" tag.

Kind regards,
--
Aaron Tomlin

Attachment: signature.asc
Description: PGP signature