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

From: Petr Mladek

Date: Fri Oct 23 2026 - 11:52:57 EST


On Sun 2026-10-04 12:36:09, Aaron Tomlin wrote:
> The sysctl hung_task_warnings currently holds both the configured warning
> limit and the remaining budget. Each detailed report decrements the
> sysctl, so once it reaches zero, the configured limit is lost and cannot
> be restored automatically.
>
> Keep sysctl_hung_task_warnings as the configured warning limit and make
> khungtaskd the sole owner of the remaining budget. A check that finds no
> hung tasks reloads the budget directly from the configured limit. A
> successful sysctl write publishes an atomic reset request, which
> khungtaskd consumes at the start of the next check.
>
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Suggested-by: Lance Yang <lance.yang@xxxxxxxxx>
> Tested-by: Lance Yang <lance.yang@xxxxxxxxx>
> Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
> Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>

Just for record, the patch looks good to me:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr