From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CWXP265CU010.outbound.protection.outlook.com (mail-ukwestazon11022091.outbound.protection.outlook.com [52.101.101.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C66E2F9D98 for ; Tue, 4 Aug 2026 00:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.101.91 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785802591; cv=fail; b=oXe+zdgKfctORM6IB8sLXLSchEO5DhZ/vC6Yts4BMHH1n0fg2UwtP81tOaYFelCvkvHVGVwPNoOGIyZyXTYZZhi4PSiZHwefaNxx0zzK4GNYspOsnA6FoQv4wO6EX11ql+r/Fn0eG/UyupuXIwZXhFXWVU0AnKrTIgKrmOtmRRU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785802591; c=relaxed/simple; bh=f/pGEZWeXK9TwEgUzJArWuQkKBZrKGmDarrrp9mBtmI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=slp5TafbAnRS2jJCfRsD42zQTc3JWlmV9nWRP7ky+FLBcMMST2JYGk6XoW4oNTtdCUCosbZG+/7eigyPL3+gF3zCB4KU7AKCtECkvohnad6QCY7UABXyU+lQ9c9qdvVa5/CWpGA2doVWeZb4ON1nzjkFivLBRGaEFo9QPEZnJBw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; arc=fail smtp.client-ip=52.101.101.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I/RqARCiXYE1QaZUjFTpRYZK1EmiaqsmnX+RRHa2KM+IEliIaoaunaddodV1twJTvm9hK8wIc+SWMTKSgRnkMd3wH8jICPo2PmGR79e8c6D3oAYk732GDKzTHW+jeo7X/SGR9jaBl3miFZK5pyTCdkCiyIbwjySbPS4vJMsvveE0QXAE1ICZLfIeJ4J/9S9L6MxtH/eIqYYqJGlaAq8rNoc4oKjw2L6BYXDIAHFc0+Txjli0pk4+MMCP8RwNQVdHX9AhIpeS5pWDRIK6M0Bjei20t8pucf73M5BT1EC8FvQFzbyAMSp23jefawKHgBiOxOG3E54jRv/gRajOTl4SYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:MIME-Version; bh=sOXoHeMu11H/NKYa1LTSlJ+y7cGiikKDxdOsZJDv8Xk=; b=nM9Wz6czBgsiTth19C+AULwMST9A5EV1cLj9oB5FBTfmgrTz2cutstcV12aaaQcYbxJ50/nFBOcam3JoKlxYRCC25lJP+ajpqKUXqfRfbESjFo7PdNu0/hKNccHIucQqIWfz713aGbZXNQtKQH5gsjGGKQxLPID0ZUUCQ4vBhWtjDXBBllzF6mC3dTtVWRdKV2MJ1jGnhoCoeTg+LuWXWPdzyWHejJsu4ZaydgxuOhamhuNsfBvs/s9v9W0/H6Z7+vhqCENtzm+ird1zDxrN/Ej/1TgrLeqOuvNrO4fyh50rANPWXgLQsEY2pmlwbN0yV943/elDQuHMCYpDufSQTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=atomlin.com; dmarc=pass action=none header.from=atomlin.com; dkim=pass header.d=atomlin.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=atomlin.com; Received: from LO6P123MB6616.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2b2::11) by LO2P123MB3741.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:12e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.18; Tue, 4 Aug 2026 00:16:29 +0000 Received: from LO6P123MB6616.GBRP123.PROD.OUTLOOK.COM ([fe80::3975:c5e7:bc1a:f383]) by LO6P123MB6616.GBRP123.PROD.OUTLOOK.COM ([fe80::3975:c5e7:bc1a:f383%4]) with mapi id 15.21.0270.017; Tue, 4 Aug 2026 00:16:29 +0000 From: Aaron Tomlin 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 2/2] hung_task: Always print basic hung task info header Date: Mon, 3 Aug 2026 20:15:42 -0400 Message-ID: <20260804001542.249639-3-atomlin@atomlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260804001542.249639-1-atomlin@atomlin.com> References: <20260804001542.249639-1-atomlin@atomlin.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BN0PR03CA0025.namprd03.prod.outlook.com (2603:10b6:408:e6::30) To CWLP123MB6607.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:183::5) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LO6P123MB6616:EE_|LO2P123MB3741:EE_ X-MS-Office365-Filtering-Correlation-Id: 6faa6df5-3fd2-4613-a248-08def1bda153 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|366016|7416014|376014|1800799024|6133799003|56012099006|10067099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: /1txt7FdNaCfpD+4P+IIflsgsPDKz9yHXbQQQyiqMgzUEF7/8S2HwAShPzVhgtzUYNbQ8Yx3lj8Au5Z2bfnAZsurKWpwrTIRex4iPtItL0GZMn6bmPP1QiG/GrkwnCjPVPp48Bu3ujp6OOcBD/Xmd9mkKmh1MSgaNGAwbhZNgTLGy4v8dTFh2ofAF43jvcW5JzXB0OMdcKazkTC5Zw6k/2bLHZVen8lnKliVS0pEUAUgFA1wJ5sYqJlNQ928hGD7L7js0HYgkAmeQa2tt8Nf2L1CotFTzBtYEouU6CLRzQlJdp+9snaPoEj+gFCG7B+FiBJHSwdfpkFbquNHCbYdtPGuI9AlnzJAM824IFj6KmixNMdhsqZaQArFdbVhESb2g5MQ1jlUjXXc7TIkVrhvzrPvakYlPH+HNnBz7/I+ZG2ve/XfZQo7Zgac1PXIBT4AqrK8WCCcxhrt3tO5u1RPr4gj+poIF+XbQ7xGBM8QBig+CD6B4N6q4vJoFF8DsZEbRxU3vRL7hysiw2YzfB+FrT74HoC4JhlSemD3qrsVfWOOHr4X/ldoTj28oM2uiLLK40A8553QjqwZ2Ovl89fGifuAxaWfN2mieCT01JX1XOirynIpo/7hevSAMbgObSrjUY9Lp0CccDZ9DzB+dN19wweQhpShuWT1NCby5hQVx80= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LO6P123MB6616.GBRP123.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(366016)(7416014)(376014)(1800799024)(6133799003)(56012099006)(10067099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CFIpNOaR1/1QX3GKtQdo6Ago8xCRZA2Nncr07rZesjdiy8nlobiDcR6A9W/i?= =?us-ascii?Q?nn7kco/1kRhl7vKc2DT5yAV5FH7MP3iYSwn9450Umh/Gpj3ZX+uRBbjN/vyB?= =?us-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L2Z5QgOO?= =?us-ascii?Q?QFh6CTqZAz9nQcq9JU7d4+Xc9vZXEJjbf15FBa4G7JDWZh+Et3h+qgWswsZ9?= =?us-ascii?Q?jbccdrxihUH/XxRyRy1s9P86IvBwkMXPdE6bGI+rxYzU9qyjbKCtpYmTYL0+?= =?us-ascii?Q?k3GPZNXNKwcfkew7Yrruu29N7nHAEmLhUqvF1VXWbt+fPk/LsKY4bnO87LFS?= =?us-ascii?Q?Eraz+HMZ58C6JEmouPR8d57vOfUeULgTHokZdmbeNx0/1dvR0FgOyokBDk1e?= =?us-ascii?Q?yvlXCgtzg5Lt7DB1xlYUS530GlzMuEZ8lcLSuxS7agMCfmSRA/dmuoyl0Kru?= =?us-ascii?Q?RUpUhvYl6C9OA9E8V5d6WVI+EMw1JTJoWzTiXz8V8fM4msf7UfpIySw6jd2e?= =?us-ascii?Q?a+RIlAST0MJmGeYTwxigCE/3as/1FQKCYAPRvo/3/NuoeGQjSE2FuBVRZ/am?= =?us-ascii?Q?awOOrSN7lMGbwY2lbQFSkKjik3wyuF7S5arsGs19Pcj+mahtYw5SIqiVr3Ix?= =?us-ascii?Q?jXX3MqwtUZWUB5cXk2Se5j7PQKow6YrpatOdwjxqry4HP/zSl8XkaOb4se1l?= =?us-ascii?Q?Q83ePiMXLNcccIvBhTkb3S6voUzp522FwDPvYxbJF9na/MQbHRfpGWnNsuz4?= =?us-ascii?Q?6A6iRvwbDVEGRlJjKvR+oVt5onwX3Wxu+Lk6oRKsU2VWlh7fieYhKH9uhmDV?= =?us-ascii?Q?zYtgXYPiye6S4a1bt6JPpwJPhoFILYDuPrDGPs5W5u6rAqwHW6acGghva3+c?= =?us-ascii?Q?at8ajxjf3Q=3D=3D?= X-OriginatorOrg: atomlin.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6faa6df5-3fd2-4613-a248-08def1bda153 X-MS-Exchange-CrossTenant-AuthSource: CWLP123MB6607.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2026 00:16:29.2750 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e6a32402-7d7b-4830-9a2b-76945bbbcb57 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZkCx7lgpZUU0RXCWwizG8V4crWodbmUVQSuEfeCqBQT+tYqPTycB0Axt3TS9Nz3swBTTvkMzYz0v3KXW7i6TCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO2P123MB3741 From: Petr Mladek Currently, hung_task_info() completely suppresses any warning messages once the warning budget is reached. This leaves the system completely blind to any future hung tasks, even though we only wanted to suppress heavy process stack dumps. Modify hung_task_info() to always print the basic single-line error message about a hung task, regardless of whether the warning budget has been exhausted. Restrict only the verbose details (such as stack dumps, taint/release status, and blockers) to when the warning budget is intact or panic is triggered. Additionally, update the notice printed upon warning exhaustion to clarify that future reports will only omit process details rather than being completely suppressed. Assisted-by: gemini-3.5-flash Signed-off-by: Petr Mladek --- kernel/hung_task.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 4e1fb0db79d1..6ebb3a87ac65 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -244,17 +244,19 @@ static void hung_task_info(struct task_struct *t, unsigned long timeout, hung_task_call_panic = true; } + /* Always print the blocked message */ + pr_err("INFO: task %s:%d blocked%s for more than %ld seconds.\n", + t->comm, t->pid, t->in_iowait ? " in I/O wait" : "", + (jiffies - t->last_switch_time) / HZ); + /* * The given task did not get scheduled for more than * CONFIG_DEFAULT_HUNG_TASK_TIMEOUT. Therefore, complain - * accordingly + * accordingly with full details if the budget is not exhausted. */ if (hung_task_warnings_printed || hung_task_call_panic) { if (hung_task_warnings_printed > 0) hung_task_warnings_printed--; - pr_err("INFO: task %s:%d blocked%s for more than %ld seconds.\n", - t->comm, t->pid, t->in_iowait ? " in I/O wait" : "", - (jiffies - t->last_switch_time) / HZ); pr_err(" %s %s %.*s\n", print_tainted(), init_utsname()->release, (int)strcspn(init_utsname()->version, " "), @@ -267,7 +269,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(); -- 2.55.0