From: Lance Yang <lance.yang@linux.dev>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: linux-kernel@vger.kernel.org, mhiramat@kernel.org,
akpm@linux-foundation.org, gregkh@linuxfoundation.org,
Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH] hung_task: Migrate hung_task_detect_count to sysfs
Date: Mon, 1 Dec 2025 11:08:54 +0800 [thread overview]
Message-ID: <03ea687c-2533-4aa4-bdb4-81128c907723@linux.dev> (raw)
In-Reply-To: <ll74yi3miktap7ljxx2fenzhqanqikk5pibvcpfhqed6k3eugj@yga4f4yjzndo>
On 2025/12/1 01:11, Aaron Tomlin wrote:
> On Sun, Nov 30, 2025 at 01:43:51PM +0800, Lance Yang wrote:
>> Hi Aaron,
>
> Hi Lance,
>
>
>> Thanks for the patch.
>
> No problem.
>
>> Emm, I don't think we should do this :)
>>
>> Removing the sysctl file is going to break userspace tools that
>> currently read it ...
>
> Thank you for your feedback. I appreciate the concern regarding user-space
> compatibility and the potential maintenance overhead of dual interfaces.
>
> I agree that removing the sysctl entry entirely right now is too
> disruptive, as it would immediately break existing user-space tools relying
> on /proc/sys/kernel/hung_task_detect_count. Your point about avoiding
> unnecessary churn and maintaining two interfaces is well-taken.
>
> However, I believe that moving the counter to sysfs is still a worthwhile
> long-term goal for the following reasons:
>
> 1. Consistency and standardisation: Moving read-only counters to
> /sys/kernel/ aligns with current kernel conventions and provides a
> more consistent location for performance and diagnostic metrics.
> This follows the pattern of existing counters like
> /sys/kernel/softlockup_count.
>
> 2. Graceful Migration Path: By adding the
> /sys/kernel/hung_task_detect_count entry first (as a read-only
> counter) and keeping the legacy
> /proc/sys/kernel/hung_task_detect_count file in place, we provide
> the necessary backwards compatibility and offer a grace period for
> user-space tools to migrate. The old sysctl file can then be flagged
> for deprecation in a future release.
>
Deprecating established sysctl ABIs is often a very long process(sometimes
indefinite) ... and I would prefer to avoid introducing redundancy unless
strictly necessary or the current interface is functionally deficient :)
So, it's a NACK from my side regarding the interface migration.
> I am currently working on some additional updates for kernel/hung_task.c.
Please let's keep it simple and leave the interface as is. I look forward
to your other updates for hung_task.c!
[...]
Thanks,
Lance
next prev parent reply other threads:[~2025-12-01 3:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 23:51 Aaron Tomlin
2025-11-30 5:43 ` Lance Yang
2025-11-30 8:30 ` Greg KH
2025-11-30 17:11 ` Aaron Tomlin
2025-12-01 3:08 ` Lance Yang [this message]
2025-12-01 22:57 ` 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=03ea687c-2533-4aa4-bdb4-81128c907723@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=atomlin@atomlin.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=pmladek@suse.com \
/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
all inboxes | Powered by JetHome®