Re: [PATCH v6] hung_task: Deduplicate identical hang reports using explicit blocker tracking

From: Lance Yang

Date: Tue Jul 21 2026 - 22:10:52 EST



On Tue, Jul 21, 2026 at 01:30:34PM -0400, Aaron Tomlin wrote:
>On Tue, Jul 21, 2026 at 03:28:48PM +0200, Petr Mladek wrote:
[...]
>
>> 3. We could prevent printing the same process again and again
>> by adding "hung_task_reported" into struct task_struct.
>>
>> But then we should print some summary about how many hung tasks
>> were found in the last round at least. So that we know that
>> the problem persists.
>>
>> This should still be rather easy. But I am not sure if it is
>> worth it.
>>
>> 4. We could add the filtering of the duplicated backtraces. But
>> it has to be handled by some helper function.
>>
>> It looks like to most complicated part. I would personally skip
>> it for now. We could always add it later when the above proposed
>> changes are not enough to tune the kernel.hung_task_warnings
>> value in the real life.
>
>I do think this is worth doing to prevent the single-line spam if a task
>remains hung for hours, no?

Nope.

TBH, if a task is still stuck hours later, something is already gone
sideways. Seen that play out plenty of times: hung task, soft/hard lockup,
panic, reboot. Hard to call that one-liner spam :)

So yeah, I still think v7 should just go with Petr's two patches. That
should take care of the problems we're trying to solve ;)

@Aaron mind taking those, testing them out, and spinning a v7?

Cheers, Lance