Re: [PATCH] hung_task: Migrate hung_task_detect_count to sysfs
From: Lance Yang
Date: Sun Nov 30 2025 - 00:43:57 EST
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 :)
Removing the sysctl file is going to break userspace tools that
currently read it ...
And, yeah, while moving read-only stats to sysfs makes sense on
paper, is it really worth the churn? Since we'd likely have to
keep the old sysctl file anyway for backward compatibility, we'd
just end up maintaining two interfaces fo the exact same counter :)
[...]
Thanks anyway,
Lance