From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-124.mta0.migadu.com [91.218.175.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B4033B6BF9 for ; Fri, 14 Aug 2026 16:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786724875; cv=none; b=fTqHyo1/PT9ltWMlktwjP3xjgAqKFczQdZ9cZsg8VYuryn+re/Jo7hd5FEH0+doVf6B+FZVNqEnfslU3VLfRJBmeioberxaZ2Km4aUMgfRYsJPuMQnH8PKaQa5HFU0AitdwJxn0r0UpgtSQkgKSRyS75K17CefMKvWyrer9D/kI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786724875; c=relaxed/simple; bh=OaUIpTgFEt5CBbflY8wXNkKEud1bgKma/9aKfobwOT0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=dm0rNYGCpUmiBqLh9LlwDK7gaGcRy34j/UUaHOO4hVgbNxgvv1iswN9cFk/FKe0y40cLLI3zoJfXAbPRa9eIucKyy5Q7othLgGPbzbrEdJeIWtQHJ+B9rAawzz7O81qDtPw45Wk9lYkwfs2bkR8v9Gne3pXpVviXxtvHh+b9yLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TvaviTWa; arc=none smtp.client-ip=91.218.175.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TvaviTWa" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=OaUIpTgFEt5CBbflY8wXNkKEud1bgKma/9aKfobwOT0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1786724869; v=1; x=1787329669; b=TvaviTWa3A3Xk9g6b7EWTOZJLG29NvDGS4QqwzMoylQbNRzWxcQ+CWn3JCzFDOI9JRqHct4O b/wJh9JzuJ8jWJblOWB/WJJ+i4G2XMaRyNDUX001bRMmPX1/GcfnJyl7LAge4tgpALHXpp5z/Vm f9YkCkwSqLXobcP6UvuWYjt0= X-Envelope-To: linux-kernel@vger.kernel.org Received: from localhost (183.241.20.126) by smtp.migadu.com with ESMTPS id 4489b52ba14e4606; Fri, 14 Aug 2026 16:27:39 +0000 X-Migadu-Flow: FLOW_OUT From: Lance Yang To: atomlin@atomlin.com Cc: akpm@linux-foundation.org, mhiramat@kernel.org, pmladek@suse.com, linux-kernel@vger.kernel.org, david.laight.linux@gmail.com, neelx@suse.com, sean@ashe.io, chjohnst@gmail.com, steve@abita.co, mproche@gmail.com, nick.lange@gmail.com, Lance Yang Subject: Re: [PATCH v9 2/2] hung_task: Log summary line when warning budget is exhausted Date: Sat, 15 Aug 2026 00:27:34 +0800 Message-Id: <20260814162734.76714-1-lance.yang@linux.dev> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20260814135718.494513-3-atomlin@atomlin.com> References: <20260814135718.494513-3-atomlin@atomlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Fri, Aug 14, 2026 at 09:57:18AM -0400, Aaron Tomlin wrote: >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. Hm... not quite unconditional. hung_task_call_panic still gets through budget gate, so with hung_task_warnings=1 and hung_task_panic=2, first task can exhaust budget and second one still gets full details (right before panic). I'd write changelog like this: 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 >Suggested-by: Lance Yang >Signed-off-by: Aaron Tomlin >--- > 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"); Same exception here... next task can hit panic threshold and print full details anyway (and this line can be printed while hung_task_call_panic is already set). I'd make condition and message match actual behavior: "hung_task: further per-task details suppressed until warning budget is reset or panic is triggered (see sysctl kernel.hung_task_warnings)\n" No need to resend just for these ... I think Andrew can fix them up when applying :) Otherwise, LGTM. Reviewed-by: Lance Yang