Re: [PATCH 0/2] hung_task: add detect count for hung tasks

From: Andrew Morton
Date: Wed Oct 23 2024 - 22:05:25 EST


On Tue, 22 Oct 2024 19:47:34 +0800 Lance Yang <ioworker0@xxxxxxxxx> wrote:

> Hi all,
>
> This patchset adds a counter, hung_task_detect_count, to track the number of
> times hung tasks are detected. This counter provides a straightforward way
> to monitor hung task events without manually checking dmesg logs.
>
> With this counter in place, system issues can be spotted quickly, allowing
> admins to step in promptly before system load spikes occur, even if the
> hung_task_warnings value has been decreased to 0 well before.
>
> Recently, we encountered a situation where warnings about hung tasks were
> buried in dmesg logs during load spikes. Introducing this counter could
> have helped us detect such issues earlier and improve our analysis efficiency.
>

Isn't the answer to this problem "write a better parser"? I mean,
we're providing userspace with information which is already available.