Re: [v6 PATCH 2/2] hung_task: Enable runtime reset of hung_task_detect_count

From: Aaron Tomlin

Date: Thu Jan 15 2026 - 13:24:52 EST


On Thu, Jan 15, 2026 at 11:06:16AM +0800, Lance Yang wrote:
> I see hung_task_diagnostics() is still in this patch. I thought
> we'd concluded that[1] the refactoring wasn't really necessary for a
> single-use block?
>
> [1] https://lore.kernel.org/all/noze3vhqjbsuulvvoaw4h5yeinggpwfslrit5vsd2dllfo4ath@qgmp22hoibgn/

Hi Lance,

Please accept my apologies for the oversight; I certainly did not intend to
disregard our previous conclusion regarding the refactoring.

However, in light of the additional modifications suggested by Petr, it
appeared to me that re-introducing hung_task_diagnostics() resulted in a
significantly cleaner implementation. By encapsulating the diagnostic
output logic, we separate the formatting concerns from the control flow,
which seemed to improve the overall readability of the function.

That being said, if you still consider this abstraction to be redundant, I
am entirely amenable to dropping it and reverting to the inline approach.

Please let me know your preference.


Kind regards,
--
Aaron Tomlin

Attachment: signature.asc
Description: PGP signature