Re: [PATCH v9 1/2] hung_task: Reset warning budget when problem gets resolved

Aaron Tomlin <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <bjucfriyzjcvryfxdwrv5gbait3tepyg2qy2lxq2ndpwg6sajx@ww6k4rdzalaw>
On Fri, Aug 14, 2026 at 11:58:21PM +0800, Lance Yang wrote:
> 
> On Fri, Aug 14, 2026 at 09:57:17AM -0400, Aaron Tomlin wrote:
> >The sysctl hung_task_warnings currently holds both the configured warning
> >limit and the remaining budget. Each detailed report decrements the
> >sysctl, so once it reaches zero, the configured limit is lost and cannot
> >be restored automatically.
> >
> >Keep sysctl hung_task_warnings unchanged and track the remaining budget
> >in hung_task_warnings_printed. Reset the runtime budget via an atomic flag
> >when a watchdog check sees no hung tasks or when userspace writes a new
> >sysctl value.
> 
> Only sysctl writes go through reset_hung_task_warnings; no-hung case
> reloads budget directly. Also worth spelling out why flag is there:
> keeping runtime budget khungtaskd-owned. I'd write it as:
> 
> Keep sysctl_hung_task_warnings as the configured warning limit and make
> khungtaskd the sole owner of the remaining budget. A check that finds no
> hung tasks reloads the budget directly from the configured limit. A
> successful sysctl write publishes an atomic reset request, which
> khungtaskd consumes at the start of the next check.
> 
> No need to resend just for this, though. I think Andrew can fix that up
> when applying.

Hi Lance,

Acknowledged.

> >Suggested-by: Petr Mladek <[email protected]>
> >Suggested-by: Lance Yang <[email protected]>
> >Tested-by: Lance Yang <[email protected]>
> >Signed-off-by: Aaron Tomlin <[email protected]>
> >---
> 
> Nothing jumped out at me, thanks!
> 
> Reviewed-by: Lance Yang <[email protected]>

Thank you!

-- 
Aaron Tomlin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.