From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Rik van Riel <riel@surriel.com>
Cc: David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, Aristeu Rozanski <aris@ruivo.org>
Subject: Re: [PATCH RFC] mm/gup: batch contiguous pages in follow_page_mask() and return them via a pages array
Date: Sat, 1 Aug 2026 10:54:42 +0100 [thread overview]
Message-ID: <am2_dWJKZBzwd8EK@lucifer> (raw)
In-Reply-To: <e969b38ce882b32d041b7279499fddcd00f18b35.camel@surriel.com>
On Fri, Jul 31, 2026 at 02:32:58PM -0400, Rik van Riel wrote:
> On Fri, 2026-07-31 at 13:33 +0100, Lorenzo Stoakes (ARM) wrote:
> > > mm/gup.c | 539 +++++++++++++++++++++++++++++++++------------------
> > > ----
> >
> > OK it seems the message isn't really getting through...
> >
> > You really have to spend at least some time filtering this LLM-
> > generated
> > stuff.
> >
> I spent a fair amount of time cleaning up the code
> and comments. Arguably the new code is cleaner than
> the old code was.
Thanks for doing a human pass but it LLM's habits really carried through
here. In general:
- No walls of text please - fewer words are better, clarity is king.
- Don't write the code in English as a comment/commit msg - redudant and
distracting.
- Sensible patch separation obviously please.
- Write as elegant/reasonable code as possible. If the code you touch was
some horrible mega-function, take the time to refactor it. Pay down
technical debt.
These are all things LLMs are extremely bad at (even fable). So they need
to be done by a human.
>
> However, I do agree this patch is too big. That won't
> happen again.
>
> > Nobody's got time for walls of text and giant changes like this.
> >
>
> I had no idea how to split it up when I made it,
> but have found a few ways now.
>
> I've split up the patch into a series of 5 now:
> 1) mm/gup: convert follow_page_mask() to return a long
> 2) mm/gup: split follow_page_pte_commit() out of follow_page_pte()
> 3) mm/gup: add gup_fill_pages() and use it
> 4) mm/gup: return a huge page's full count from follow_page_mask()
> 5) mm/gup: walk multiple PTEs per follow_page_pte() call
>
> The changelogs naturally got shorter with things
> split up this way.
OK I guess we'll see on respin about the comments.
>
> > And at least use a reasonable model - sonnet isn't intended for
> > kernel
> > development is it?
>
> Also, I have found that while Opus tends to make fewer
> mistakes than Sonnet, they both produce unreadable LLM
> output when left alone.
Unfortunately based on your recent submissions I don't agree.
In general, even with fable, I've found that the code it generates is
nowhere near kernel quality.
I'd suggest using the generated code as guidance only and the LLM for
checking things rather than making things.
>
> In order for them to produce code that is at least a
> good starting point for editing, they need to follow
> rules.
>
> Once you apply the rules, Opus and Sonnet do not
> produce results that are all that different from
> each other.
>
> I just added a few new rules, so the tooling won't
> even let me create too-large patches any more.
I mean, sure, but what's needed here is human Rik :)
>
>
> Whenever you see me, or somebody else, produce
> something wrong, either with or without an LLM,
> please yell at me, so I can add the proper rules
> to kernel-style (creation side), or review-prompts
> (review side), so those things get caught
> automatically in the future, and not sent to the
> list.
Well as you can tell I'm not afraid to - well I wouldn't say yell, more
civilised than that - protest :)
In general, again, the human layer is what's needed here not more rules
IMO.
Reviewer/submitter asymmetry was already a huge problem, AI slop makes it
critical and means people repeatedly submitting things that look like that
will get rejected out of hand.
Let's try to avoid that here :)
>
> --
> All Rights Reversed.
--
Cheers, Lorenzo
next prev parent reply other threads:[~2026-08-01 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 7:53 [PATCH RFC] mm/gup: batch contiguous pages in follow_page_mask() and return them via a pages array Rik van Riel
2026-07-31 12:33 ` Lorenzo Stoakes (ARM)
2026-07-31 18:32 ` Rik van Riel
2026-08-01 9:54 ` Lorenzo Stoakes (ARM) [this message]
2026-08-01 12:25 ` Rik van Riel
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=am2_dWJKZBzwd8EK@lucifer \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aris@ruivo.org \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=riel@surriel.com \
/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.