Re: [PATCH v3 2/2] hung_task: Enable runtime reset of hung_task_detect_count
From: Aaron Tomlin
Date: Sun Dec 21 2025 - 16:00:24 EST
On Fri, Dec 19, 2025 at 10:15:14PM +0800, Lance Yang wrote:
> Clever! If it's a real persistent hang, we'll catch it next
> time anyway.
>
> But yeah, add a comment explaining that we're ok with
> undercounting one scan if counter gets reset mid-flight.
>
> Future readers will thank you ;)
Hi Petr, Lance,
Thank you for the feedback.
> > It should be acceptable. The panic() is needed when the lockup looks
> > permanent. And if the lockup is permanent then the right
> > total_hung_task number will be computed by the next check.
> >
> > Please, add a comment into the code explaining why it is done this way
> > and why it is OK.
Acknowledged.
> Right, memory ordering matters!
Agreed.
> Explicit is better. Echo 0 to reset, anything else is an error :)
Acknowledged.
> Yeah, I think this is the way to go. Much better than adding a
> lock to hung task detector ...
Agreed.
I will prepare a new series.
Kind regards,
--
Aaron Tomlin
Attachment:
signature.asc
Description: PGP signature