Re: [PATCH 2/4] ksm: skip rmap_item allocation for non-zero pages under only_merge_zero_pages
From: Xu Xin (vivo)
Date: Wed Nov 11 2026 - 03:41:10 EST
> On Tue, Nov 10, 2026 at 07:22:06PM +0800, Xu Xin (vivo) wrote:
> > On Tue, Nov 10, 2026 at 10:05:20AM +0000, Lorenzo Stoakes (ARM) wrote:
> > > On Tue, Nov 10, 2026 at 03:44:49PM +0800, Xu Xin (vivo) wrote:
> > > >
> > > > A page that is zero now but is written before cmp_and_merge_page() runs
> > > > is still handled correctly, because the checksum-based decision in
> > > > cmp_and_merge_page() (added by the previous patch) is the authoritative
> > > > one.
> > > >
> > >
> > > Please re-write this in your own words.
> > >
> > > It seems very LLM generated, LLMs are _terrible_ at writing commit messages
> > > and commits, please re-write all of that.
> >
> > Indeed, the description was generated by LLM, but I thought that was clear enough
> > to present what this patch do and why. Aparrently, you don't like that style, I'll
> > rewrite that by handd.
>
> In general we never want LLM-generated commit messages/comments.
>
> I do however obviously appreciate and empathise with using it to assist
> non-native speakers. So that's fine, but ideally you would write it up yourself
> and then have the LLM do simply a polishing layer, keeping the length as small
> as possible, which should give us the best of both worlds. Thanks :)
>
> >
> > The goal is only to avoid rmap_item allocation for pages that can never merge
> > under only_merge_zero_pages. The implementation is simple.
> >
> > I'll send a v3 with those changes.
>
> Well let's wait on David's POV on this series for this cycle before a respin
> first thanks!
Thanks Lorenzo, makes sense.
Hi David,
What are your thoughts on targeting this series for this cycle? I understand
you have a lot on your plate having just taken over mm/core.git and are
focusing on bugfixes right now, so I'm fine with deferring this to the next
cycle even though the implementation itself is fairly straightforward.
Whenever it's a good time for sending a v3, I'll make sure to address Lorenzo's
feedback by rewriting the commit messages and comments, and simplifying
scan_get_next_rmap_item() as much as possible.
Thanks,
Xu