Re: [RFC PATCH v2 4/7] mm: Optimise SPARSEMEM implementation of for_each_valid_pfn()

From: David Woodhouse
Date: Mon Apr 07 2025 - 04:02:44 EST


On Mon, 2025-04-07 at 10:07 +0300, Mike Rapoport wrote:
> On Fri, Apr 04, 2025 at 04:59:56PM +0100, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> >
> > There's no point in checking the section and subsection bitmap for *every*
> > PFN in the same section; they're either all valid or they aren't.
>
> Don't you want to merge this with the previous commit?

Maybe. Or at least the previous commit should be using the 'return -1'
model to minimise the differences.

To start with though, I wanted it to be reviewable as an incremental
patch to what we'd already been discussing. (And I figured there was at
least a non-zero chance of you not liking it just because it's too
complex, so the whole thing is easy to drop this way).

Even after review, keeping it as a separate patch means it's easily
revertible if we find we want to go back to the simpler version.


Attachment: smime.p7s
Description: S/MIME cryptographic signature