Re: [PATCH v2 0/9] mm/huge_memory: refactor zap_huge_pmd()

Lorenzo Stoakes (Oracle)
2026-03-20T13:28:06Z

On Thu, Mar 19, 2026 at 08:09:17PM -0700, Andrew Morton wrote:
> On Thu, 19 Mar 2026 13:00:06 +0000 "Lorenzo Stoakes (Oracle)" <ljs@kernel.org> wrote:
>
> > The zap_huge_pmd() function is overly complicated, clean it up and also add
> > an assert in the case that we encounter a buggy PMD entry that doesn't
> > match expectations.
> >
> > This is motivated by a bug discovered [0] where the PMD entry was none of:
> >
> > * A non-DAX, PFN or mixed map.
> > * The huge zero folio
> > * A present PMD entry
> > * A softleaf entry
> >
> > In zap_huge_pmd(), but due to the bug we manged to reach this code.
> >
> > It is useful to explicitly call this out rather than have an arbitrary NULL
> > pointer dereference happen, which also improves understanding of what's
> > going on.
> >
> > [0]:https://lore.kernel.org/all/6b3d7ad7-49e1-407a-903d-3103704160d8@lucifer.local/
>
> AI review has questions, which I assume you've seen
> https://sashiko.dev/#/patchset/cover.1773924928.git.ljs%40kernel.org

Nope but I'll have a look through and see what's valid.

>
>
>
> This isn't going well from a workflow POV. I merge stuff (this was v2)
> then half a day later a bunch of potential issues are identified.
>
> If these reviews are useful (they seem to be, enough) then I guess I'll
> need to further increase the lag between seeing-it and merging-it. But
> if there's a 2-day lag before I get onto a series and I'm the first to
> look at Sashiko then that won't help.
>
> So it needs to be something like
>
> - series is posted
> - 24 hours pass
> - submitter takes a look at the AI review, maybe prepares a new
> series.
> - 24 hours pass
> - rinse, repeat
> - it gets merged, hopefully with some Reviewed-by"s.
>
> Not unreasonable, but it requires that submitter be made aware of
> Sashiko's comments. At present that's via me being tiresome.
>
>
> Anyway, early days. I'm thinking that an emailed reply-to-all from
> Sashiko will help. Much hinges on how useful submitters find these
> questions to be - something which I'm paying close attention to...
>

Please not yet, it produces a lot of noise. I've responded at length on the
thread on this [0], and while I appreciate the tooling, it's not ready to
be treated as giving entirely valid feedback yet :)

I think David's on the same page as me on this.

Cheers, Lorenzo