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, mhiramat@kernel.org,
akpm@linux-foundation.org, joel.granados@kernel.org
Subject: Re: [v6 PATCH 2/2] hung_task: Enable runtime reset of hung_task_detect_count
Date: Fri, 16 Jan 2026 10:10:57 +0800 [thread overview]
Message-ID: <9e8c49cb-cbf9-4cdf-8dea-9abbb03e05a4@linux.dev> (raw)
In-Reply-To: <i6fjmq2ria7f5uwqtrknzmgxactxeyzovn2zg7iv7tmzn5jeko@53eudpfmexbr>
On 2026/1/16 02:24, Aaron Tomlin wrote:
> On Thu, Jan 15, 2026 at 11:06:16AM +0800, Lance Yang wrote:
>> I see hung_task_diagnostics() is still in this patch. I thought
>> we'd concluded that[1] the refactoring wasn't really necessary for a
>> single-use block?
>>
>> [1] https://lore.kernel.org/all/noze3vhqjbsuulvvoaw4h5yeinggpwfslrit5vsd2dllfo4ath@qgmp22hoibgn/
>
> Hi Lance,
>
> Please accept my apologies for the oversight; I certainly did not intend to
> disregard our previous conclusion regarding the refactoring.
>
> However, in light of the additional modifications suggested by Petr, it
> appeared to me that re-introducing hung_task_diagnostics() resulted in a
> significantly cleaner implementation. By encapsulating the diagnostic
> output logic, we separate the formatting concerns from the control flow,
> which seemed to improve the overall readability of the function.
>
> That being said, if you still consider this abstraction to be redundant, I
> am entirely amenable to dropping it and reverting to the inline approach.
>
> Please let me know your preference.
Thanks for explaining!
Personally, I still do not think the helper is necessary here.
Especially for a single-use block, the abstraction doesn't add much
value.
The inline version is actually more straightforward - you can see
the diagnostic output right where it's used without jumping to another
function.
Please drop the helper and keep that code inline :)
next prev parent reply other threads:[~2026-01-16 2:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 2:32 [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector 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 [this message]
2026-01-15 3:24 ` [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector Lance Yang
2026-01-15 18:18 ` 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=9e8c49cb-cbf9-4cdf-8dea-9abbb03e05a4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.