Re: [RFC V2] mm: Enable generic pfn_valid() to handle early sections with memmap holes

From: Mike Rapoport
Date: Thu Apr 22 2021 - 06:04:11 EST


On Thu, Apr 22, 2021 at 11:48:58AM +0200, David Hildenbrand wrote:
> >
> > > IOW, avoiding having to adjust generic pfn_valid()/pfn_to_online_page() at
> > > all. Am i missing something or should that be possible?
> >
> > We are back again to the question "should arm64 free its memmap".
> > If the answer is no, we don't need arm64::pfn_valid() for SPARSEMEM at all.
> > If the answer is yes, Anshuman's patch is way better than a custom
> > pfn_valid().
>
> Well, I propose something in between: stop freeing with SPARSEMEM, continue
> freeing with FLATMEM.

I'm all for it.

--
Sincerely yours,
Mike.