From: Aaron Tomlin <atomlin@atomlin.com>
To: akpm@linux-foundation.org, lance.yang@linux.dev,
mhiramat@kernel.org, pmladek@suse.com
Cc: linux-kernel@vger.kernel.org, david.laight.linux@gmail.com,
atomlin@atomlin.com, neelx@suse.com, sean@ashe.io,
chjohnst@gmail.com, steve@abita.co, mproche@gmail.com,
nick.lange@gmail.com
Subject: [PATCH v9 2/2] hung_task: Log summary line when warning budget is exhausted
Date: Fri, 14 Aug 2026 09:57:18 -0400 [thread overview]
Message-ID: <20260814135718.494513-3-atomlin@atomlin.com> (raw)
In-Reply-To: <20260814135718.494513-1-atomlin@atomlin.com>
Once the warning budget is exhausted, hung_task_info() stops printing
per-task details. To provide visibility without causing additional log
spam, emit a single aggregate summary line at the end of each watchdog
scan when hung tasks are detected and the warning budget is exhausted.
Keep per-task reports budgeted to avoid flooding dmesg or causing
ring buffer overflows during system-wide hangs.
Suggested-by: Petr Mladek <pmladek@suse.com>
Suggested-by: Lance Yang <lance.yang@linux.dev>
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
---
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 53499fbead83..f5eb75325f3a 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -268,7 +268,7 @@ static void hung_task_info(struct task_struct *t, unsigned long timeout,
debug_show_blocker(t, timeout);
if (!hung_task_warnings_printed)
- pr_info("Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings\n");
+ pr_info("Future hung task reports won't print details about each process, see sysctl kernel.hung_task_warnings\n");
}
touch_nmi_watchdog();
@@ -354,6 +354,10 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
return;
}
+ if (!hung_task_warnings_printed && !hung_task_call_panic)
+ pr_info("hung_task: %lu hung tasks detected, warning budget exhausted\n",
+ this_round_count);
+
if (need_warning || hung_task_call_panic) {
si_mask |= SYS_INFO_LOCKS;
--
2.55.0
next prev parent reply other threads:[~2026-08-14 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 13:57 [PATCH v9 0/2] hung_task: Improve warning budget handling and task reporting Aaron Tomlin
2026-08-14 13:57 ` [PATCH v9 1/2] hung_task: Reset warning budget when problem gets resolved Aaron Tomlin
2026-08-14 15:58 ` Lance Yang
2026-08-14 17:22 ` Aaron Tomlin
2026-08-14 13:57 ` Aaron Tomlin [this message]
2026-08-14 16:27 ` [PATCH v9 2/2] hung_task: Log summary line when warning budget is exhausted Lance Yang
2026-08-14 17:26 ` Aaron Tomlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814135718.494513-3-atomlin@atomlin.com \
--to=atomlin@atomlin.com \
--cc=akpm@linux-foundation.org \
--cc=chjohnst@gmail.com \
--cc=david.laight.linux@gmail.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mproche@gmail.com \
--cc=neelx@suse.com \
--cc=nick.lange@gmail.com \
--cc=pmladek@suse.com \
--cc=sean@ashe.io \
--cc=steve@abita.co \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.