[PATCH] arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional
Will Deacon
will at kernel.org
Fri May 19 03:35:54 PDT 2023
On Thu, May 18, 2023 at 05:04:26PM +0100, Catalin Marinas wrote:
> On Thu, May 18, 2023 at 04:56:28PM +0100, Marc Zyngier wrote:
> > On Wed, 03 May 2023 13:33:42 +0100,
> > Catalin Marinas <catalin.marinas at arm.com> wrote:
> > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > > index b1201d25a8a4..1867aba83ba3 100644
> > > --- a/arch/arm64/Kconfig
> > > +++ b/arch/arm64/Kconfig
> > > @@ -1516,7 +1516,7 @@ config XEN
> > > # 16K | 27 | 14 | 13 | 11 |
> > > # 64K | 29 | 16 | 13 | 13 |
> > > config ARCH_FORCE_MAX_ORDER
> > > - int "Order of maximal physically contiguous allocations" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES)
> > > + int "Order of maximal physically contiguous allocations"
> > > default "13" if ARM64_64K_PAGES
> > > default "11" if ARM64_16K_PAGES
> > > default "10"
> >
> > This patch (and the previous one) has the unfortunate side effect of
> > completely breaking a change of page size (from 4k to 16k, for
> > example):
> >
> > <quote>
> > maz at valley-girl:~/hot-poop/arm-platforms$ make defconfig
> > *** Default configuration is based on 'defconfig'
> > #
> > # configuration written to .config
> > #
> > maz at valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config
> > CONFIG_ARM64_PAGE_SHIFT=12
> > CONFIG_ARCH_FORCE_MAX_ORDER=10
> > maz at valley-girl:~/hot-poop/arm-platforms$ make menuconfig
> > configuration written to .config
> >
> > *** End of the configuration.
> > *** Execute 'make' to start the build or try 'make help'.
> >
> > maz at valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config
> > CONFIG_ARM64_PAGE_SHIFT=14
> > CONFIG_ARCH_FORCE_MAX_ORDER=10
> > </quote>
> >
> > The build then fails in ways that aren't obvious (BUILD_BUG in the THP
> > code). It would much better if the result of the configuration tool
> > would produce something that can actually build.
>
> Thanks Marc for reporting this. The main culprit is the removal of the
> ranges, so MAX_ORDER stays at 10 when changing the page size, but only
> with EXPERT enabled. With this patch, it just generalises the problem
> even without EXPERT.
>
> So we either re-introduce the ranges or we drop the menuconfig entry
> completely, regardless of EXPERT. I'm inclined to go with the latter,
> just don't allow people to redefine this (still unclear to me if we need
> a higher default with 4K pages).
It doesn't solve the issue, but I'll drop this patch for now since it sounds
like we're going to be reworking this further and we may as well avoid the
churn.
Will
More information about the linux-arm-kernel
mailing list