Re: [PATCH v10 2/2] hung_task: Log summary line when warning budget is exhausted
From: Bradley Morgan
Date: Sat Aug 29 2026 - 11:22:54 EST
On 29 August 2026 15:53:21 BST, Aaron Tomlin <atomlin@xxxxxxxxxxx> wrote:
>Once the warning budget is exhausted, hung_task_info() normally stops
>printing per-task details. When panic is triggered, full details are
>still printed so diagnostics remain available before panic.
>
>To retain visibility without restoring per-task output after budget
>exhaustion, emit a single aggregate summary line at the end of each
>watchdog scan that detects hung tasks with an exhausted budget. This
>keeps non-panic per-task reports budgeted during system-wide hangs.
>
>Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
>Suggested-by: Lance Yang <lance.yang@xxxxxxxxx>
>Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
>Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
Ok, Reviewed-by: Bradley Morgan <brads@xxxxxxxxxxxxxx>
>Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
>---
> kernel/hung_task.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/kernel/hung_task.c b/kernel/hung_task.c
>index a5043188456d..49d47ae475ab 100644
>--- a/kernel/hung_task.c
>+++ b/kernel/hung_task.c
>@@ -277,7 +277,7 @@ static void hung_task_info(struct task_struct *t, unsigned long timeout,
> debug_show_blocker(t, timeout);
>
> if (!hung_task_warnings_budget)
>- pr_info("Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings\n");
>+ pr_info("hung_task: further per-task details suppressed until warning budget is reset or panic is triggered (see sysctl kernel.hung_task_warnings)\n");
Cool.
> }
>
> touch_nmi_watchdog();
>@@ -363,6 +363,10 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
> return;
> }
>
>+ if (!hung_task_warnings_budget && !hung_task_call_panic)
>+ pr_info("hung_task: %lu hung tasks detected, warning budget exhausted\n",
>+ this_round_count);
>+
Nice!
> if (need_warning || hung_task_call_panic) {
> si_mask |= SYS_INFO_LOCKS;
>
>
--- Thanks!
https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@xxxxxxxxx/