Re: [PATCHv3 2/4] x86/64/mm: Make SPARSEMEM_VMEMMAP the only memory model

From: Ingo Molnar
Date: Fri May 16 2025 - 10:09:28 EST



* Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote:

> On Fri, May 16, 2025 at 06:42:03AM -0700, Dave Hansen wrote:
> > On 5/16/25 05:33, Kirill A. Shutemov wrote:
> > > 5-level paging only supports SPARSEMEM_VMEMMAP. CONFIG_X86_5LEVEL is
> > > being phased out, making 5-level paging support mandatory.
> > >
> > > Make CONFIG_SPARSEMEM_VMEMMAP mandatory for x86-64 and eliminate
> > > any associated conditional statements.
> > I think we have ourselves a catch-22 here.
> >
> > SPARSEMEM_VMEMMAP was selected because the other sparsemem modes
> > couldn't handle a dynamic MAX_PHYS{MEM,ADDR}_BITS introduced by 5-level
> > paging. Now you're proposing making it static again, but keeping the
> > SPARSEMEM_VMEMMAP dependency.
> >
> > If you remove the dynamic MAX_PHYS{MEM,ADDR}_BITS, you should also
> > remove the dependency on SPARSEMEM_VMEMMAP. No?
>
> I guess. But how?
>
> And is there any value to support !SPARSEMEM_VMEMMAP?

Not really IMHO:

.config.opensuse.default: CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
.config.ubuntu.localinstall: CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
.config.fedora.generic: CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
.config.rhel.generic: CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y

Thanks,

Ingo