public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aaron Tomlin <atomlin@atomlin.com>
To: akpm@linux-foundation.org, lance.yang@linux.dev,
	mhiramat@kernel.org, gregkh@linuxfoundation.org
Cc: sean@ashe.io, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector
Date: Mon,  8 Dec 2025 23:12:16 -0500	[thread overview]
Message-ID: <20251209041218.1583600-1-atomlin@atomlin.com> (raw)

Introduce a write-only sysfs attribute,
/sys/kernel/hung_task_detect_count_reset, to reset the total count of
detected hung tasks at runtime.

The attribute requires writing the value "1" to trigger the reset and returns
-EINVAL for any other input, ensuring robustness.

This addition is primarily justified by the need for enhanced
administrative control and improved diagnostics workflow in a running
production environment. It addresses a key limitation of the existing
mechanism: the inability to clear persistent state without resorting to a
full system reboot. The sysfs interface provides a non-disruptive, runtime
method to manage the diagnostic state.

After a system administrator investigates a potential hang and corrects the issue,
it is now possible to clear the history back to zero. This provides a clean
slate for subsequent monitoring, ensuring that any new recurrence of a hung
task is immediately reflected by a counter value greater than zero,
streamlining the post-mortem diagnostic phase.


Aaron Tomlin (2):
  hung_task: Consolidate hung task warning into an atomic log block
  hung_task: Provide runtime reset interface for hung task detector

 .../sysfs-kernel-hung_task_detect_count_reset |  8 +++
 kernel/hung_task.c                            | 68 ++++++++++++++++---
 2 files changed, 66 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-kernel-hung_task_detect_count_reset

-- 
2.51.0


             reply	other threads:[~2025-12-09  4:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09  4:12 Aaron Tomlin [this message]
2025-12-09  4:12 ` [PATCH 1/2] hung_task: Consolidate hung task warning into an atomic log block Aaron Tomlin
2025-12-09  5:12   ` Lance Yang
2025-12-09  6:56     ` Greg KH
2025-12-09 22:14       ` Aaron Tomlin
2025-12-10  7:37         ` Greg KH
2025-12-10 13:08         ` Petr Mladek
2025-12-09 22:11     ` Aaron Tomlin
2025-12-09  4:12 ` [PATCH 2/2] hung_task: Provide runtime reset interface for hung task detector Aaron Tomlin
2025-12-09  4:54   ` Lance Yang
2025-12-09 22:06     ` Aaron Tomlin

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=20251209041218.1583600-1-atomlin@atomlin.com \
    --to=atomlin@atomlin.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=sean@ashe.io \
    /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