Re: [PATCH] hung_task: Migrate hung_task_detect_count to sysfs

From: Greg KH

Date: Sun Nov 30 2025 - 03:30:58 EST


On Sun, Nov 30, 2025 at 01:43:51PM +0800, Lance Yang wrote:
> Hi Aaron,
>
> Thanks for the patch.
>
> On 2025/11/30 07:51, Aaron Tomlin wrote:
> > The hung_task_detect_count metric, which tracks the cumulative number of
> > tasks detected as hung since boot, is currently exposed via the legacy
> > /proc/sys/kernel/hung_task_detect_count sysctl file.
> >
> > Migrate this metric to a read-only file in the /sys/kernel/ hierarchy:
> > /sys/kernel/hung_task_detect_count. The sysctl file is removed, and the
> > metric is now controlled by the CONFIG_SYSFS Kconfig option.
>
> Emm, I don't think we should do this :)

I agree, because:

> Removing the sysctl file is going to break userspace tools that
> currently read it ...

We can't do that.

thanks,

greg k-h