Re: [PATCH 1/2] hung_task: Consolidate hung task warning into an atomic log block

From: Aaron Tomlin
Date: Tue Dec 09 2025 - 17:11:51 EST


On Tue, Dec 09, 2025 at 01:12:14PM +0800, Lance Yang wrote:
> > + " %s %s %.*s\n"
> > + "%s\n"
>
> "%s\n" forces an unconditional newline, causing a spurious blank line when
> the flag isn't set, right?

Yes, apologies. I will resolve the above in a subsequent patch.

> Since there's only one caller, why not just open-code it ...

Acknowledged.

> TBH, jamming everything into a single pr_err() call doesn't look any
> cleaner to me than the original code :(

Agreed on the aesthetics; however, the technical motivation is sound. This
method is required to generate a non-interleaved diagnostic block and avoid
losing contextual information in high-concurrency logging. This is an area
of concern for us.

Kind regards,
--
Aaron Tomlin

Attachment: signature.asc
Description: PGP signature