Re: [PATCH v4 10/13] mm/collapse: open-code collapse_single_pmd() in its two callers

From: Andrew Morton

Date: Tue Oct 13 2026 - 17:39:04 EST


On Tue, 13 Oct 2026 22:25:21 +0200 "David Hildenbrand (Arm)" <david@xxxxxxxxxx> wrote:

> >> Based on that, I'd rather want to see collapse_single_pmd() to just inline the file
> >> and anon paths, and see how we can further optimize the locking internally (e.g., perform
> >> the pagecache scanning without the mmap lock).
> >
> > I see the appeal of the single entry point for the collapse engine. I do.
> >
> > But it costs us on both the locking picture and the scan rate. That
> > does not work for me.
>
> So this is in mm-unstable and I want at least the first 9 patches to go to
> mm-stable rather sooner than later.
>
> As raised in person, I don't like the open-coding here; it just results in weird
> API. I wonder whether we can come up with a better interface, while keeping the
> locking as per your requirement cheap (scan performance).
>
> While we figure that out, does it make sense to send out revised patch 1..9 to
> move them to mm-stable while we figure out the remainder of the new API?

I've suggested to Kyril that we park this series until the next -rc
cycle.

But I can bring it back - we have a couple of weeks, three if we get a
3-week merge window.