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

David Woodhouse dwmw2 at infradead.org
Mon Apr 7 01:01:19 PDT 2025


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 at amazon.co.uk>
> > 
> > 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5069 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250407/9ee04396/attachment.p7s>


More information about the linux-arm-kernel mailing list