[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d463k2kseemaqmfc4jvrwhhzxcl4cxynyld77uwx7an6m6zfrq@ois7s6zsmjmw>
Date: Sun, 21 Dec 2025 16:26:56 -0500
From: Aaron Tomlin <atomlin@...mlin.com>
To: Joel Granados <joel.granados@...nel.org>
Cc: Lance Yang <lance.yang@...ux.dev>, Petr Mladek <pmladek@...e.com>,
akpm@...ux-foundation.org, mhiramat@...nel.org, gregkh@...uxfoundation.org, sean@...e.io,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] hung_task: Enable runtime reset of
hung_task_detect_count
On Thu, Dec 18, 2025 at 10:08:07AM +0100, Joel Granados wrote:
> Would it make more sense to write it like this:
>
> Indicates the total number of tasks that have been detected as hung
> since the system boot or since the counter was reset. Counter is
> zeroed when written to.
Hi Joel,
Thank you for the feedback.
> > That's okay, I think. See vmstat_refresh() for a similar pattern - it
> You are correct but wouldn't it make more sense to zero it out only when
> the write value passed by the user is zero. And return -EINVAL for any
> other value?
I entirely agree with your assessment: only a value of zero should be
considered valid for resetting sysctl_hung_task_detect_count. Any attempt
by a user to write a non-zero value should be rejected with a return of
-EINVAL. This approach provides a much more intuitive interface.
Kind regards,
--
Aaron Tomlin
Powered by blists - more mailing lists