The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: akpm@linux-foundation.org, lance.yang@linux.dev,
	mhiramat@kernel.org, pmladek@suse.com,
	linux-kernel@vger.kernel.org, neelx@suse.com, sean@ashe.io,
	chjohnst@gmail.com, steve@abita.co, mproche@gmail.com,
	nick.lange@gmail.com
Subject: Re: [PATCH] hung_task: Add per-round stack trace deduplication
Date: Wed, 17 Jun 2026 23:04:55 +0100	[thread overview]
Message-ID: <20260617230455.73cff28d@pumpkin> (raw)
In-Reply-To: <20260617184841.1447955-1-atomlin@atomlin.com>

On Wed, 17 Jun 2026 14:48:41 -0400
Aaron Tomlin <atomlin@atomlin.com> wrote:

> Currently, when multiple tasks hang in the exact same location (e.g.,
> such as severe contention for a mutex), khungtaskd indiscriminately
> reports every single instance. This wastes ring buffer space with
> identical stack traces up to the defined warning limit (i.e.,
> kernel.hung_task_warnings), obscuring the root cause without providing
> any additional diagnostic value.
> 
> Introduce a lightweight, hash-based stack trace deduplicator for
> khungtaskd to ensure only unique stack traces are reported during
> a single detection interval.

How many different stacks do you need to suppress?
Mostly wont it be 'the same as the last one'?
So just a linear scan through a very small number of entries will
largely DTRT.
Much simpler code and a much smaller data footprint.

	David

  reply	other threads:[~2026-06-17 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 18:48 [PATCH] hung_task: Add per-round stack trace deduplication Aaron Tomlin
2026-06-17 22:04 ` David Laight [this message]
2026-06-18  0:59 ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260617230455.73cff28d@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@atomlin.com \
    --cc=chjohnst@gmail.com \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mproche@gmail.com \
    --cc=neelx@suse.com \
    --cc=nick.lange@gmail.com \
    --cc=pmladek@suse.com \
    --cc=sean@ashe.io \
    --cc=steve@abita.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox