Re: [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector

From: Lance Yang

Date: Thu Jan 15 2026 - 21:22:44 EST




On 2026/1/16 02:18, Aaron Tomlin wrote:
On Thu, Jan 15, 2026 at 11:24:13AM +0800, Lance Yang wrote:
IIUC, we should just do:
- Patch 1: Full cmpxchg-based counting (Petr's POC), sysctl read-only
- Patch 2: Add write handler for userspace reset

That way Patch 1 is the real logic change, and Patch 2 is just adding
the userspace interface.

Hi Lance,

Thank you for your feedback.
If I am not mistaken, Joel suggested the following structure [1]:

1. Create a preparatory patch to change the data type to atomic_long_t
2. Introduce the required functionality to support a reset to "0"

[1]: https://lore.kernel.org/lkml/d4vx6k7d4tlagesq55yrbma26i2nyt4tpijkme6ckioeyfqfec@txrs27niaj2m/


Yeah, either way works :)

But that way (changing to atomic with the old logic first, then
rewriting to the new logic) seems like it creates more churn
and makes review harder.

Or just all in one?

I'd hope Petr and Joel can comment.