Re: [v5 PATCH 1/2] hung_task: Introduce helper for hung task warning

From: Lance Yang
Date: Thu Jan 01 2026 - 22:40:39 EST




On 2026/1/2 03:28, Aaron Tomlin wrote:
On Thu, Jan 01, 2026 at 05:49:59PM +0800, Lance Yang wrote:
I am wondering whether we should leave that code as-is to
avoid unnecessary churn ...

That code was not particularly complex or duplicated :)

Hi Lance,

While I agree the current logic is simple, separating the verbose reporting
from the detection loop significantly improves the readability of
check_hung_task(). This refactoring introduces no runtime overhead
(static inline) while providing a cleaner, encapsulated structure for any
future diagnostic enhancements.

For a single-use diagnostic block, I still think this refactoring
does not add much practical value ...

Let's leave the code alone - it's probably not worth the churn :)