Skip to contentSkip to conversation

arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional

PATCH Applied Catalin Marinas 6 participants 13 messages May 3, 2023 – May 19, 2023 arm64

lore
Share & tools
lore

Catalin Marinas

author maintainer
#0 lore raw

PATCH 1/1 arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +1 -1
index b1201d25a8a4..1867aba83ba3 100644
@@ -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"

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 17 lines
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +1 -1
index b1201d25a8a4..1867aba83ba3 100644
@@ -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"
Signature · 7 lines
Sincerely yours,
Mike.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 1/1
#2 lore raw
In reply to Catalin Marinas
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>

This works for me, thanks.

Quoted 9 lines
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +0 -0
index b1201d25a8a4..1867aba83ba3 100644

arch/arm64/Kconfig config XEN · line 1522

Quoted 8 lines
arch/arm64/Kconfig +1 -1
@@ -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"

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw
Quoted 21 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 4 lines

This works for me, thanks.

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw
Quoted 24 lines · Ard Biesheuvel
Quoted 23 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>

This works for me, thanks.

Quoted 7 lines
Quoted 2 lines

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

Yeah, there still was no explanation why Fedora/RHEL had to increase MAX_ORDER in their configs.

I'm surely missing something, but I also don't understand why ThunderX would need physically contiguous allocations larger than 4M.

Signature · 7 lines
Sincerely yours,
Mike.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw
Quoted 34 lines · Mike Rapoport
Quoted 24 lines · Ard Biesheuvel
Quoted 23 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>

This works for me, thanks.

Quoted 7 lines
Quoted 2 lines

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

Quoted 6 lines

Yeah, there still was no explanation why Fedora/RHEL had to increase MAX_ORDER in their configs.

I'm surely missing something, but I also don't understand why ThunderX would need physically contiguous allocations larger than 4M.

https://lore.kernel.org/all/[email protected]/

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw
Quoted 35 lines · Ard Biesheuvel
Quoted 34 lines · Mike Rapoport
Quoted 31 lines · Ard Biesheuvel
Quoted 21 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 4 lines

This works for me, thanks.

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

Quoted 7 lines
Quoted 5 lines

Yeah, there still was no explanation why Fedora/RHEL had to increase MAX_ORDER in their configs.

I'm surely missing something, but I also don't understand why ThunderX would need physically contiguous allocations larger than 4M.

https://lore.kernel.org/all/[email protected]/

But does not the second patch in that series (now commit 30f2136346ca ("irqchip/gicv3-its: Add range check for number of allocated pages")) ensures that allocation is not larger than 256 pages?

Or this is another allocation?

Signature · 7 lines
Sincerely yours,
Mike.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#7 lore raw
Quoted 43 lines · Mike Rapoport
Quoted 41 lines · Ard Biesheuvel
Quoted 39 lines · Mike Rapoport
Quoted 24 lines · Ard Biesheuvel
Quoted 23 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>

This works for me, thanks.

Quoted 7 lines
Quoted 2 lines

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

Yeah, there still was no explanation why Fedora/RHEL had to increase MAX_ORDER in their configs.

I'm surely missing something, but I also don't understand why ThunderX would need physically contiguous allocations larger than 4M.

Quoted 8 lines
Quoted 1 line

https://lore.kernel.org/all/[email protected]/

But does not the second patch in that series (now commit 30f2136346ca ("irqchip/gicv3-its: Add range check for number of allocated pages")) ensures that allocation is not larger than 256 pages?

Or this is another allocation?

I have no idea, but that it not really the point.

The point is that ThunderX is obsolete - it was never a very compelling value proposition in the first place, but today it is just a waste of electricity. So if it was the only reason for changing the max order, perhaps it's time to change it back?

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw
Quoted 53 lines · Ard Biesheuvel
Quoted 43 lines · Mike Rapoport
Quoted 41 lines · Ard Biesheuvel
Quoted 39 lines · Mike Rapoport
Quoted 24 lines · Ard Biesheuvel
Quoted 23 lines · Justin Forbes
Quoted 12 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Quoted 6 lines
Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>

This works for me, thanks.

Quoted 7 lines
Quoted 2 lines

I'd still be interested in gaining a better understanding as to why Fedora/RHEL think they need to change this value on arm64. In particular, whether it is to support ThunderX, or whether there are any good reasons for doing so that we are unaware of.

Yeah, there still was no explanation why Fedora/RHEL had to increase MAX_ORDER in their configs.

I'm surely missing something, but I also don't understand why ThunderX would need physically contiguous allocations larger than 4M.

Quoted 8 lines
Quoted 1 line

https://lore.kernel.org/all/[email protected]/

But does not the second patch in that series (now commit 30f2136346ca ("irqchip/gicv3-its: Add range check for number of allocated pages")) ensures that allocation is not larger than 256 pages?

Or this is another allocation?

Quoted 6 lines

I have no idea, but that it not really the point.

The point is that ThunderX is obsolete - it was never a very compelling value proposition in the first place, but today it is just a waste of electricity. So if it was the only reason for changing the max order, perhaps it's time to change it back?

Well, that's up to Fedora/RHEL to drop their changes to the configuration. Since Kirill's changes to MAX_ORDER semantics they will have to update their config anyway for 6.4 and onwards.

Signature · 7 lines
Sincerely yours,
Mike.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#9 lore raw
In reply to Catalin Marinas
Quoted 6 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Quoted 6 lines

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

[...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional

      https://git.kernel.org/arm64/c/fd2d1cb8c545

Cheers,

Signature · 10 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#10 lore raw
In reply to Catalin Marinas
Quoted 28 lines · Catalin Marinas

Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. This change may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do not want to enable EXPERT.

Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES || ARM64_16K_PAGES) condition as the latter no longer makes sense after the ranges were removed. The latter makes all the page size configurations consistent w.r.t. ARCH_FORCE_MAX_ORDER.

Fixes 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER")
Cc Will Deacon <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +0 -0
index b1201d25a8a4..1867aba83ba3 100644

arch/arm64/Kconfig config XEN · line 1522

Quoted 8 lines
arch/arm64/Kconfig +1 -1
@@ -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@valley-girl:~/hot-poop/arm-platforms$ make defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
maz@valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config
CONFIG_ARM64_PAGE_SHIFT=12
CONFIG_ARCH_FORCE_MAX_ORDER=10
maz@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@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,

	M.
Signature · 6 lines
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#11 lore raw
Quoted 35 lines · Marc Zyngier

arch/arm64/Kconfig config XEN · line 1522

Quoted 13 lines · Catalin Marinas
arch/arm64/Kconfig +1 -1
index b1201d25a8a4..1867aba83ba3 100644
@@ -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@valley-girl:~/hot-poop/arm-platforms$ make defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
maz@valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config
CONFIG_ARM64_PAGE_SHIFT=12
CONFIG_ARCH_FORCE_MAX_ORDER=10
maz@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'.

Quoted 8 lines
maz@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).

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#12 lore raw
Quoted 50 lines · Catalin Marinas
Quoted 35 lines · Marc Zyngier

arch/arm64/Kconfig config XEN · line 1522

Quoted 13 lines · Catalin Marinas
arch/arm64/Kconfig +1 -1
index b1201d25a8a4..1867aba83ba3 100644
@@ -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@valley-girl:~/hot-poop/arm-platforms$ make defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
maz@valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config
CONFIG_ARM64_PAGE_SHIFT=12
CONFIG_ARCH_FORCE_MAX_ORDER=10
maz@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'.

Quoted 8 lines
maz@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.

Quoted 4 lines

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel