Re: [PATCH 3/3] arm: extend pfn_valid to take into accound freed memory map alignment

From: Russell King (Oracle)
Date: Tue May 18 2021 - 05:44:39 EST

On Tue, May 18, 2021 at 12:06:13PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> When unused memory map is freed the preserved part of the memory map is
> extended to match pageblock boundaries because lots of core mm
> functionality relies on homogeneity of the memory map within pageblock
> boundaries.
> Since pfn_valid() is used to check whether there is a valid memory map
> entry for a PFN, make it return true also for PFNs that have memory map
> entries even if there is no actual memory populated there.

I thought pfn_valid() was a particularly hot path... do we really want
to be doing multiple lookups here? Is there no better solution?

RMK's Patch system:
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!