From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 89049366056 for ; Mon, 9 Feb 2026 10:14:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770632071; cv=none; b=Z2DmgXbt40/1SQ/JY1n+3U3hwGhOoqF4TkyxDgBiDygTIZWznazf4UlhTQrtUGH97J+8JY3a+j5Udg2OigZPH+qdxhg7Cv/2Gj+9RTTv3VZ9hYmqfKgNrPt7ZYcMPfbGFtMzGGoNE68rxHNy5fSjr0QMKmbB6P2kx2Dp7rVTG78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770632071; c=relaxed/simple; bh=4L8++vIcoo56Z81xMCY9AlzX2n0OPl+RGkC+3lFMVHM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ip6qqenOrelaFdt8H/wVhzWAoOspmww5oXkKIxgI58DGRJC2DfP27E1gderGrf2mN2zZSVlzfzn1YSC84YVZA10DOo6HuSKc+24dgL+lvaZNJXnjgpcutkHpjY8X0PXXVrU6E/G9maNQHm7re4mOHCRh7//NLuYxoSXv63oRuxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=fOU5n6U4; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="fOU5n6U4" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-48069a48629so39485795e9.0 for ; Mon, 09 Feb 2026 02:14:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770632070; x=1771236870; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sL9V1JavWUqIlcw20rHmrBFX5bIMcIrUb7OqKuApXvA=; b=fOU5n6U4AB5BUIG9AA95PiTcU3caRBRo1NY1zk4v+fRE5JAuhjPNjNGDIlbhMsyEki 7Fw/4CQczY2AMmoAzhiMGE+HAfUdIBhuzuIhDpP0m6DPAM8JxPIiYqj0JoLFBMK25ALj ENX73L7MZlGPhLxzViOfXR/2TyCuZTa1p36n/drSrrGNtTOEtBXPfeRq3CztzKX7kXRn JPdH4Y2uLdyVjLOvuSXEya3DnumQYlDsCMeR5yKZronPF8w+pg4LGyjWDpbEpNJg7Ywr WKTzjfiVWS2pYWkj56xqFVTBYUbQc0RgNu3OaR7hNzTd1gP35h/O4swhxpBicA73Icrc SHJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770632070; x=1771236870; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sL9V1JavWUqIlcw20rHmrBFX5bIMcIrUb7OqKuApXvA=; b=H6ByaxqrmFPHyYZSxKZfzXI7jHiv8w7M+Hitfx5CwvyF9u3BuhUGFFVYTdILWKsK0q bQZ+UvD32znZMPDLlchOxFwQuWclIowiMlzHTtNNNjZEpFD0ZZU8FW5R/a8iHt+l3jwZ vUBdZFWhMQ3rIMhHuh43N/pGheyCzapwl1n7z4TJD1XywFJ5jSSY6G7A41YLLjLa8wOn yV6pTUlGcRjv/U7ZUUkm3v9r+6QP/fE7qjVZfV/Aa3oMIIZ7+aj66Br13pQhlCpuR+ne +knjmWmgkzAGLZmq1iTtvGAnIuRdE4RAbJTg+9TkhMuVyDnsYW8jwvCL/7lSxN1jEy86 H4Fg== X-Forwarded-Encrypted: i=1; AJvYcCXvWNW0PkGTTM7WEQ9FoJpe725FBbYdGU4FJtZJnV+p6O94uP79zLRAgMmHqz+cay4JX+PCpXWNx7siePo=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9BBt3gi1Fu2AisOFMjpZCwrQwRDayEP18bLZtiQQKrKN/Uhcx H2jvUFY/G7Hh8dmj/oBwGo9CMHFQM4GgThubKnYud8Zt6usYOc/pyla3Z8ZBvBResnM= X-Gm-Gg: AZuq6aKmUK111roeVA5mheNBgjYXvJi05bEEax2dyt8z/qXjOyl3s85DgvgvwblUQbb YPZ/TrDSgcqrBxf681MbLegd38r68eGdrDf2Q0X6h4rMsSgaB/h4P7/2sfI1u6clLkcCjAGHSTL psU3hn4dLvOcOF2HhDJSpljZeo9Y1qdMnt3PyWk79Mw3cvhyOr3X2UdomJprza3wSODhquRnOXL LtlJncdWBW9CjuDHNrkgWiWNqnS+Q7Kc9TZ3YlNJO1kYjG/f8SuExvbhsrf8F7A/Jo/W+K1Pmv8 d/00zFN7l1cNY1ZPTX/GN1igdiEd969YPMIjrhJM9Zze0cdJDl1PrEgl/xJJxi5pIEh/FAuA0vp +zCDa34lZVt83rDL2X6XYBCwNG1F8MGHegkeMKxawHqPm9hh6aJaMHQsOclOTH20gPtdPsgkI5V ptQqfnE3NDSbO/pw== X-Received: by 2002:a05:600c:1d14:b0:47d:4047:f377 with SMTP id 5b1f17b1804b1-4832022a4cdmr167100355e9.36.1770632069833; Mon, 09 Feb 2026 02:14:29 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43629756bc3sm23934372f8f.39.2026.02.09.02.14.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 02:14:29 -0800 (PST) Date: Mon, 9 Feb 2026 11:14:27 +0100 From: Petr Mladek To: Aaron Tomlin Cc: akpm@linux-foundation.org, lance.yang@linux.dev, mhiramat@kernel.org, gregkh@linuxfoundation.org, neelx@suse.com, sean@ashe.io, mproche@gmail.com, chjohnst@gmail.com, nick.lange@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] hung_task: Explicitly report I/O wait state in log output Message-ID: References: <20260208002458.3791059-1-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=us-ascii Content-Disposition: inline In-Reply-To: <20260208002458.3791059-1-atomlin@atomlin.com> On Sat 2026-02-07 19:24:58, Aaron Tomlin wrote: > 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. This is true. > 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. IMHO, this is not true. The blocked tasks might wake up at any time. There is a small chance to print an inconsistent information. But we could live with it. The entire hung task report is racy. The race would actually be a lucky moment where the task get unblocked. In this case, it won't be reported in the next round... I suggest to omit the entire paragraph. > Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Aaron Tomlin Othrewise, it looks good. With the removed paragraph: Reviewed-by: Petr Mladek Best Regards, Petr