From: Lance Yang <lance.yang@linux.dev>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: sean@ashe.io, linux-kernel@vger.kernel.org, pmladek@suse.com,
gregkh@linuxfoundation.org, akpm@linux-foundation.org,
joel.granados@kernel.org, mhiramat@kernel.org
Subject: Re: [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector
Date: Thu, 15 Jan 2026 11:24:13 +0800 [thread overview]
Message-ID: <3783efcc-f5f3-433d-a812-dc95030c87f1@linux.dev> (raw)
In-Reply-To: <20260115023229.3028462-1-atomlin@atomlin.com>
On 2026/1/15 10:32, Aaron Tomlin wrote:
> Hi Lance, Greg, Petr, Joel, Andrew,
>
> This series introduces the ability to reset
> /proc/sys/kernel/hung_task_detect_count.
>
> Writing a "0" value to this file atomically resets the counter of detected
> hung tasks. This functionality provides system administrators with the
> means to clear the cumulative diagnostic history following incident
> resolution, thereby simplifying subsequent monitoring without necessitating
> a system restart.
>
> The updated logic ensures that the long-running scan (which is inherently
> preemptible and subject to rcu_lock_break()) does not become desynchronised
> from the global state. By treating the initial read as a "version snapshot"
> the kernel can guarantee that the cumulative count only updates if the
> underlying state remained stable throughout the duration of the
> scan.
>
> Please let me know your thoughts.
There is a mismatch here with what Joel and Petr suggested ...
IIUC, we should just do:
- Patch 1: Full cmpxchg-based counting (Petr's POC), sysctl read-only
- Patch 2: Add write handler for userspace reset
That way Patch 1 is the real logic change, and Patch 2 is just adding
the userspace interface.
Thanks,
Lance
next prev parent reply other threads:[~2026-01-15 3:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 2:32 Aaron Tomlin
2026-01-15 2:32 ` [v6 PATCH 1/2] hung_task: Convert detection count to atomic_long_t Aaron Tomlin
2026-01-15 2:32 ` [v6 PATCH 2/2] hung_task: Enable runtime reset of hung_task_detect_count Aaron Tomlin
2026-01-15 3:06 ` Lance Yang
2026-01-15 18:24 ` Aaron Tomlin
2026-01-16 2:10 ` Lance Yang
2026-01-15 3:24 ` Lance Yang [this message]
2026-01-15 18:18 ` [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector Aaron Tomlin
2026-01-16 2:22 ` Lance Yang
2026-01-20 9:46 ` Petr Mladek
2026-01-20 11:48 ` Lance Yang
2026-01-23 0:59 ` 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=3783efcc-f5f3-433d-a812-dc95030c87f1@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=atomlin@atomlin.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel.granados@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=pmladek@suse.com \
--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
Powered by JetHome