Re: [PATCH v7 1/2] hung_task: Reset warning budget when problem gets resolved
Lance Yang <[email protected]>
| Newsgroups | gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 04, 2026 at 11:54:05AM -0400, Aaron Tomlin wrote: >From: Petr Mladek <[email protected]> > >sysctl_hung_task_warnings counts how many hung tasks are reported. >The watchdog does not report anything once the limit is reached. >Currently, this budget is decremented permanently, meaning the kernel is >left blind to subsequent hung tasks even after the original issue resolves. > >Keep the global sysctl_hung_task_warnings intact, and instead decrement >a copy (hung_task_warnings_printed) when warnings are printed. Reset >the copy back to the configured sysctl_hung_task_warnings limit once the >problem on the system gets resolved and check_hung_uninterruptible_tasks() >detects no hung tasks in a check interval. > >Also keep the copy updated when the global sysctl_hung_task_warnings >value is updated via sysctl, and update documentation to reflect >the new behavior. I'd go with something like: " hung_task: separate warning limit from runtime budget 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 when a watchdog check sees no hung tasks or when userspace writes a new sysctl value. " [...] Cheers, Lance