From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from LO3P265CU004.outbound.protection.outlook.com (mail-uksouthazon11020101.outbound.protection.outlook.com [52.101.196.101]) (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 48BAD237713 for ; Wed, 28 Jan 2026 20:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.196.101 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769633125; cv=fail; b=rXugk/r4+MOKlkuqKhSgsQ7wvj16EpJFD3cvqfZe0JPrfEFCJN80CywxcvrOA0I3SEudaReTaf1uX5qEa4tYHjCAQx7qwznv+CYE8jmBA/EJN59inhsWg8XsEOfQsAKzdD/0ZL+86xc8UZKbAudDGvwkAma5orGVPpnc4YuFtyc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769633125; c=relaxed/simple; bh=cf8/yxH5EuJAIlEn2AophYspiooaJ9q6wDmWLWLsf28=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=YaHT9sGQw1+wcAhtfnWkFtnFSQfdQ/hZpqZCIa3cGhaJKXpGnZXdRM5xS8xyW4gXbWBt/UENipMFx9cxT87d/aaOgmaj4S8GNbjYdL5n5PwiOROEXw11Few8lgqkfI+c0hEICf7NGSo+4OPMGgB6Dk4lVgc578bflKss4BmmecI= 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.196.101 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=ezriPKfDBNKXq4aFikMVmTU+97qLIp4QrO5xuERGHIhc7mhJWt6q/srzzMNKMmeaxum2SkKcl8Z4GtFp2SsfjnTCKV6nM/BD1rrYNQuJzvscMViCRFi00LLsK4N0ZSe+G8SU76Q1lw3o5KfH8G1CtpTmEUqHZ+9tAC+hOgRtaJEMIoxu22h7qSp0SnPROdcf/k8ITF8Yf96uhOnhxs6bqTUtN3PGqV04SvYcQtXJ8zUAOsFPd+UGs9XOppvwnRZo90qriMG/E7cVQF7pcp2Pfh80hLFRmTLtzLW+AOiRi1g0hIjcj5goosYPdIulDdlqktptHJisuymFBO1H0axvXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Za+idJYhEVTBiY/FqKRycH7Zoo3ce1+PQ+2dTPc/HJI=; b=QLeXEh0Ljn/pOomuNw+yDv+j10kQ/9HQf2VEvN9dUUN63t681fUSVRAcgXLFEsM7E+wBe4r8ZTjtKNHdVd3iYvDTK2Kch3osKQ3jnPIHI0VgNamySEOUQUMJLXl/j/BNTdxp1pi0Wps46qXeyDZkaNlJz8NkeZaMp1CIK96K8sfB5YiZ9j/F4It38Y5mXk8b4cJfg4IPaBNtZw9zx3ardvQf0V53MbMDomdgpbLes3EFENoHh3AwNfYh6qIOR3zZzMfLwO+74aQtxYF/domtSwEtO73q/Su3/IaEHoNwZt9uGqDwsl84496147fWL56fNiHPBkVTso6SvVQ+ix86Ag== 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 CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) by CWLP123MB2993.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:5c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.10; Wed, 28 Jan 2026 20:45:20 +0000 Received: from CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf]) by CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf%5]) with mapi id 15.20.9542.015; Wed, 28 Jan 2026 20:45:20 +0000 From: Aaron Tomlin To: akpm@linux-foundation.org, lance.yang@linux.dev, mhiramat@kernel.org, gregkh@linuxfoundation.org, pmladek@suse.com, joel.granados@kernel.org Cc: neelx@suse.com, sean@ashe.io, mproche@gmail.com, chjohnst@gmail.com, nick.lange@gmail.com, linux-kernel@vger.kernel.org Subject: [v2 PATCH 0/1] hung_task: Explicitly report I/O wait state in log output Date: Wed, 28 Jan 2026 15:45:15 -0500 Message-ID: <20260128204516.3473709-1-atomlin@atomlin.com> X-Mailer: git-send-email 2.51.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR22CA0026.namprd22.prod.outlook.com (2603:10b6:208:238::31) To CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) 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: CWLP123MB3523:EE_|CWLP123MB2993:EE_ X-MS-Office365-Filtering-Correlation-Id: c4f0c8cb-f26d-48c7-68fb-08de5eae267c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?yrMfSIGV/TrTBKLeIxsBptQcadN9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ascii?Q?H2AA1uX5SHSrkFS1j3vB6qD6E7TnfjWxtZU+JauktSIK0FnvjEz1mDdGTIjY?= =?us-ascii?Q?3bilo0QK5mRe9/kiciVXyPbmEXr8WzUCe/PUIJZN6NVE7VgpAajAmcPpdOdP?= =?us-ascii?Q?nvlHrMLHccct6P2/DzFruWhnOKA4zkh+etv0zbQ2VxXeWgLyZplvYqiZL5Cm?= =?us-ascii?Q?cQhfWayB1CpGdqLWqMhW185ZPFtGTnwr70HugG2KbrTd3/G/uWSaaYO/YzUj?= =?us-ascii?Q?+4F9c33/T/pw7vd6lEgx+fI1O210g0DLXc3bx7f36Q1KCRKw1mCXF/Yr+Epn?= =?us-ascii?Q?gVCFN+opLPYz7OX7q7YtCf6KIsqYRpxVz+k9zKpSpqYxsDURmiaNbvXRMhx7?= =?us-ascii?Q?0xocOmQAnKL94TpIxyiHHuExz8vJ1mW4cNSzo8fv0CsQvn41n3ZRrPogCJNZ?= =?us-ascii?Q?smZFk0G7SHjDQW8e1oesoZxXegFi+Q3AQEYRULbMcQj9qlfhRge9z6bLgFjl?= =?us-ascii?Q?lbngvIYRRwup8UwfRL7xO5CWc3gANGdOjt2E+HBJC+rULY7Ft3U6vHKDhuK2?= =?us-ascii?Q?IebeZ0GbOdEsvcB3YsmklwTDDuPz8V8AjwG0lYH44KbBv7wNMGj3MkPplYOK?= =?us-ascii?Q?WlYGHUbffpcz8xJl6UPTFWdLCG6p9zYZGZqEOQbSeP4eLuUXe337GcI+cBWP?= =?us-ascii?Q?pR6otOdBFpmuyO0TpaQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q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D?= X-OriginatorOrg: atomlin.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4f0c8cb-f26d-48c7-68fb-08de5eae267c X-MS-Exchange-CrossTenant-AuthSource: CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2026 20:45:20.0093 (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: BVUdWPEq2298zAIO+cbe14T+CkcP20KV31gLVsXlhvlhu1HH1eJHwIz+kSYwvctWV5yphBsWKuijjd7bdf4fIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWLP123MB2993 Hi Lance, Masami, Petr, Andrew, Currently, the hung task reporting mechanism indiscriminately labels all TASK_UNINTERRUPTIBLE (D) tasks as "blocked", irrespective of whether they are awaiting I/O completion or kernel locking primitives. This ambiguity compels system administrators to manually inspect stack traces to discern whether the delay stems from an I/O wait (typically indicative of hardware or filesystem anomalies) or software contention. Such detailed analysis is not always immediately accessible to system administrators or support engineers. To address this, this patch utilises the existing in_iowait field within struct task_struct to augment the failure report. If the task is blocked due to I/O (e.g., via io_schedule_prepare()), the log message is updated to explicitly state "blocked in I/O wait". Examples: - Standard Block: "INFO: task bash:123 blocked for more than 120 seconds". - I/O Block: "INFO: task dd:456 blocked in I/O wait for more than 120 seconds". Accessing in_iowait is safe in this context. The detector holds rcu_read_lock() within check_hung_uninterruptible_tasks(), ensuring the task structure remains valid in memory. Furthermore, as the task is confirmed to be in a persistent TASK_UNINTERRUPTIBLE state, it cannot modify its own in_iowait flag, rendering the read operation stable and free from data races. Please let me know your thoughts. Changes since v1 [1]: - Updated patch subject to reflect the new output format (was: "hung_task: Differentiate between I/O and Lock/Resource waits") - Changed log output from "D (Disk I/O)" to "blocked in I/O wait" (Masami Hiramatsu) [1]: https://lore.kernel.org/lkml/20260125203905.3393869-1-atomlin@atomlin.com/ Aaron Tomlin (1): hung_task: Explicitly report I/O wait state in log output kernel/hung_task.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.51.0