Re: [PATCH v8 0/2] hung_task: Improve warning budget handling and task reporting

Andrew Morton <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue,  4 Aug 2026 16:20:48 -0400 Aaron Tomlin <[email protected]> wrote:

> The hung_task watchdog detects tasks stuck in TASK_UNINTERRUPTIBLE (D)
> state for longer than CONFIG_DEFAULT_HUNG_TASK_TIMEOUT seconds. To prevent
> log spam during system spikes, sysctl_hung_task_warnings enforces a budget
> on the number of logged warnings.
> 
> However, the current implementation has two major limitations:
> 
>     1. Permanent exhaustion of warning budget
> 
>        sysctl_hung_task_warnings is decremented directly when printing
>        warnings. Once this budget hits zero, no further warnings are
>        reported until an administrator manually updates the sysctl value or
>        reboots the system. Consequently, a single temporary hang episode
>        permanently blinds the kernel watchdog to any subsequent hung tasks
>        after system recovery.
> 
>     2. Total log suppression when budget is exhausted
> 
>        Once the warning budget reaches zero, hung_task_info() completely
>        suppresses all output, including the basic single-line alert. While
>        suppressing verbose stack dumps and lock debugging is desirable to
>        prevent dmesg flooding, hiding basic task alerts leaves
>        administrators entirely unaware that tasks are hanging.
> 
> This patch series resolves both limitations by decoupling the configured
> warning budget from the runtime warning counter, automatically resetting
> the budget when the system recovers, and keeping basic single-line hung
> task alerts visible.

Thanks.  A couple of concerns from AI review:
	https://sashiko.dev/#/patchset/[email protected]

Apologies if these were considered during review of previous
iterations.
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.