Re: Follow-up on Linux-kernel code accessibility

From: Steven Rostedt

Date: Mon Dec 22 2025 - 10:40:32 EST


On Fri, 19 Dec 2025 16:36:33 -0800
"Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote:

> > This is one of the motivations I have for modeling the complex portions of
> > the tracing subsystem. I'm hoping that I can see better ways to perform
> > these tasks and possibly even improve its performance.
>
> If there are 100,000 function-like things in the kernel, and we add 100
> lines of comments to each, we will have expanded the kernel source by
> some tens of percent. Plus staleness and/or churn will likely be problems.

I'm really only interested in the more subtle and complex functions. The
majority of those 100,000 functions do not need extra comments.

And I honestly don't care about increasing the source due to comments.
That's a good thing. I like going to a subsystem and seeing a lot of
comments in the code. I hate going to a subsystem where there's no
comments, thus you need to try to figure out the context from the code, and
when I had that, I usually got it wrong.

>
> Yes, it helped you, and that is good. But is this really the best way to
> achieve that goal? Better than human walkthroughs? Than querying LLMs
> that ingested the code? Better than producing external documentation
> at the design/code level?

So far I've not been too happy with the results of LLMs describing code.
They tend to come up with the same mistakes I do when I try to figure out
what the author of the code was doing by looking only at the code without
any comments that came from said author.

-- Steve