arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER
Subsystems (10)
v2 cover arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER
From: "Mike Rapoport (IBM)" <[email protected]>
Hi,
Several architectures have ARCH_FORCE_MAX_ORDER in their Kconfig and they all have wrong and misleading prompt and help text for this option.
Besides, some define insane limits for possible values of ARCH_FORCE_MAX_ORDER, some carefully define ranges only for a subset of possible configurations, some make this option configurable by users for no good reason.
This set updates the prompt and help text everywhere and does its best to update actual definitions of ranges where applicable.
kbuild generated a bunch of false positives because it assigns -1 to ARCH_FORCE_MAX_ORDER, hopefully this will be fixed soon.
v2:
* arm64: show prompt for ARCH_FORCE_MAX_ORDER only if EXPERT (Catalin)
* Add Acked- and Reviewed-by tags (thanks Geert, Kirill and Max)
v1: https://lore.kernel.org/all/[email protected]
Mike Rapoport (IBM) (14):
arm: reword ARCH_FORCE_MAX_ORDER prompt and help text
arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER
arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text
csky: drop ARCH_FORCE_MAX_ORDER
ia64: don't allow users to override ARCH_FORCE_MAX_ORDER
m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text
nios2: reword ARCH_FORCE_MAX_ORDER prompt and help text
nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER
powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text
powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER
sh: reword ARCH_FORCE_MAX_ORDER prompt and help text
sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER
sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text
xtensa: reword ARCH_FORCE_MAX_ORDER prompt and help text
arch/arm/Kconfig | 16 +++++++++------- arch/arm64/Kconfig | 27 ++++++++++++--------------- arch/csky/Kconfig | 4 ---- arch/ia64/Kconfig | 3 +-- arch/m68k/Kconfig.cpu | 16 +++++++++------- arch/nios2/Kconfig | 17 +++++++++-------- arch/powerpc/Kconfig | 22 +++++++++------------- arch/sh/mm/Kconfig | 19 +++++++++---------- arch/sparc/Kconfig | 16 +++++++++------- arch/xtensa/Kconfig | 16 +++++++++------- 10 files changed, 76 insertions(+), 80 deletions(-)
base-commit: 51551d71edbc998fd8c8afa7312db3d270f5998e
Signature · 36 lines
2.35.1 *** BLURB HERE *** Mike Rapoport (IBM) (14): arm: reword ARCH_FORCE_MAX_ORDER prompt and help text arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text csky: drop ARCH_FORCE_MAX_ORDER ia64: don't allow users to override ARCH_FORCE_MAX_ORDER m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text nios2: reword ARCH_FORCE_MAX_ORDER prompt and help text nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER sh: reword ARCH_FORCE_MAX_ORDER prompt and help text sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text xtensa: reword ARCH_FORCE_MAX_ORDER prompt and help text arch/arm/Kconfig | 16 +++++++++------- arch/arm64/Kconfig | 26 ++++++++++++-------------- arch/csky/Kconfig | 4 ---- arch/ia64/Kconfig | 3 +-- arch/m68k/Kconfig.cpu | 16 +++++++++------- arch/nios2/Kconfig | 17 +++++++++-------- arch/powerpc/Kconfig | 22 +++++++++------------- arch/sh/mm/Kconfig | 19 +++++++++---------- arch/sparc/Kconfig | 16 +++++++++------- arch/xtensa/Kconfig | 16 +++++++++------- 10 files changed, 76 insertions(+), 79 deletions(-) base-commit: 51551d71edbc998fd8c8afa7312db3d270f5998e -- 2.35.1
PATCH v2 1/14 arm: reword ARCH_FORCE_MAX_ORDER prompt and help text
From: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/arm/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/Kconfig +9 -7
@@ -1354,17 +1354,19 @@ config ARM_MODULE_PLTS configurations. If unsure, say y. config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" + int "Order of maximal physically contiguous allocations" default "11" if SOC_AM33XX default "8" if SA1111 default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. + + Don't change if unsure. config ALIGNMENT_TRAP def_bool CPU_CP15_MMU
Signature · 1 line
2.35.1
PATCH v2 2/14 arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
It is not a good idea to change fundamental parameters of core memory management. Having predefined ranges suggests that the values within those ranges are sensible, but one has to *really* understand implications of changing MAX_ORDER before actually amending it and ranges don't help here.
Drop ranges in definition of ARCH_FORCE_MAX_ORDER and make its prompt visible only if EXPERT=y
--- arch/arm64/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm64/Kconfig +1 -3
@@ -1487,11 +1487,9 @@ config XEN # 16K | 27 | 14 | 13 | 11 | # 64K | 29 | 16 | 13 | 13 | config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" if ARM64_4K_PAGES || ARM64_16K_PAGES + int "Maximum zone order" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES) default "13" if ARM64_64K_PAGES - range 11 13 if ARM64_16K_PAGES default "11" if ARM64_16K_PAGES - range 10 15 if ARM64_4K_PAGES default "10" help The kernel memory allocator divides physically contiguous memory
Signature · 1 line
2.35.1
PATCH v2 3/14 arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/arm64/Kconfig | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm64/Kconfig +12 -12
@@ -1487,24 +1487,24 @@ config XEN # 16K | 27 | 14 | 13 | 11 | # 64K | 29 | 16 | 13 | 13 | config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES) + int "Order of maximal physically contiguous allocations" if ARM64_4K_PAGES || ARM64_16K_PAGES default "13" if ARM64_64K_PAGES default "11" if ARM64_16K_PAGES default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. - We make sure that we can allocate up to a HugePage size for each configuration. - Hence we have : - MAX_ORDER = PMD_SHIFT - PAGE_SHIFT => PAGE_SHIFT - 3 + The maximal size of allocation cannot exceed the size of the + section, so the value of MAX_ORDER should satisfy - However for 4K, we choose a higher default value, 10 as opposed to 9, giving us - 4M allocations matching the default size used by generic code. + MAX_ORDER + PAGE_SHIFT <= SECTION_SIZE_BITS + + Don't change if unsure. config UNMAP_KERNEL_AT_EL0 bool "Unmap kernel when running in userspace (aka \"KAISER\")" if EXPERT
Signature · 1 line
2.35.1
Re: [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text
Quoted 18 lines · Mike Rapoport
From: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of
ARCH_FORCE_MAX_ORDERare not even close to describe this configuration option.Update both to actually describe what this option does.
Signed-off-by Mike Rapoport (IBM) <[email protected]>--- arch/arm64/Kconfig | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)arch/arm64/Kconfig +0
-0
arch/arm64/Kconfig config XEN · line 1490
Quoted 5 lines
arch/arm64/Kconfig +1
-1@@ -1487,24 +1487,24 @@ config XEN # 16K | 27 | 14 | 13 | 11 | # 64K | 29 | 16 | 13 | 13 | config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES) + int "Order of maximal physically contiguous allocations" if ARM64_4K_PAGES || ARM64_16K_PAGES
It seems that "if EXPERT" was dropped by accident here.
Quoted 33 lines
arch/arm64/Kconfig +11
-11default "13" if ARM64_64K_PAGES default "11" if ARM64_16K_PAGES default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. - We make sure that we can allocate up to a HugePage size for each configuration. - Hence we have : - MAX_ORDER = PMD_SHIFT - PAGE_SHIFT => PAGE_SHIFT - 3 + The maximal size of allocation cannot exceed the size of the + section, so the value of MAX_ORDER should satisfy - However for 4K, we choose a higher default value, 10 as opposed to 9, giving us - 4M allocations matching the default size used by generic code. + MAX_ORDER + PAGE_SHIFT <= SECTION_SIZE_BITS + + Don't change if unsure. config UNMAP_KERNEL_AT_EL0 bool "Unmap kernel when running in userspace (aka \"KAISER\")" if EXPERTSignature · 1 line
2.35.1
--
Best Regards,
Yan, Zi
PATCH v2 4/14 csky: drop ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The default value of ARCH_FORCE_MAX_ORDER matches the generic default defined in the MM code, the architecture does not support huge pages, so there is no need to keep ARCH_FORCE_MAX_ORDER option available.
Drop it.
--- arch/csky/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
arch/csky/Kconfig +0 -4
@@ -332,10 +332,6 @@ config HIGHMEM select KMAP_LOCAL default y -config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" - default "10" - config DRAM_BASE hex "DRAM start addr (the same with memory-section in dts)" default 0x0
Signature · 1 line
2.35.1
PATCH v2 5/14 ia64: don't allow users to override ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
It is enough to keep default values for base and huge pages without letting users to override ARCH_FORCE_MAX_ORDER.
Drop the prompt to make the option unvisible in *config.
--- arch/ia64/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/Kconfig +1 -2
@@ -202,8 +202,7 @@ config IA64_CYCLONE If you're unsure, answer N. config ARCH_FORCE_MAX_ORDER - int "MAX_ORDER (10 - 16)" if !HUGETLB_PAGE - range 10 16 if !HUGETLB_PAGE + int default "16" if HUGETLB_PAGE default "10"
Signature · 1 line
2.35.1
PATCH v2 6/14 m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/m68k/Kconfig.cpu | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/m68k/Kconfig.cpu +9 -7
@@ -398,21 +398,23 @@ config SINGLE_MEMORY_CHUNK Say N if not sure. config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" if ADVANCED + int "Order of maximal physically contiguous allocations" if ADVANCED depends on !SINGLE_MEMORY_CHUNK default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. For systems that have holes in their physical address space this value also defines the minimal size of the hole that allows freeing unused memory map. + Don't change if unsure. + config 060_WRITETHROUGH bool "Use write-through caching for 68060 supervisor accesses" depends on ADVANCED && M68060
Signature · 1 line
2.35.1
PATCH v2 7/14 nios2: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/nios2/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/nios2/Kconfig +9 -7
@@ -45,16 +45,18 @@ menu "Kernel features" source "kernel/Kconfig.hz" config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" + int "Order of maximal physically contiguous allocations" range 8 19 default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. + + Don't change if unsure. endmenu
Signature · 1 line
2.35.1
PATCH v2 8/14 nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
nios2 defines range for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 19, which implies maximal contiguous allocation size of 2^19 pages or 2GiB.
Drop bogus definition of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible default.
Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.
--- arch/nios2/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/nios2/Kconfig +0 -1
@@ -46,7 +46,6 @@ source "kernel/Kconfig.hz" config ARCH_FORCE_MAX_ORDER int "Order of maximal physically contiguous allocations" - range 8 19 default "10" help The kernel page allocator limits the size of maximal physically
Signature · 1 line
2.35.1
PATCH v2 9/14 powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/powerpc/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/powerpc/Kconfig +9 -7
@@ -896,7 +896,7 @@ config DATA_SHIFT 8M pages will be pinned. config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" + int "Order of maximal physically contiguous allocations" range 7 8 if PPC64 && PPC_64K_PAGES default "8" if PPC64 && PPC_64K_PAGES range 12 12 if PPC64 && !PPC_64K_PAGES
@@ -910,17 +910,19 @@ config ARCH_FORCE_MAX_ORDER range 10 63 default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. The page size is not necessarily 4KB. For example, on 64-bit systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep this in mind when choosing a value for this option. + Don't change if unsure. + config PPC_SUBPAGE_PROT bool "Support setting protections for 4k subpages (subpage_prot syscall)" default n
Signature · 1 line
2.35.1
PATCH v2 10/14 powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
PowerPC defines ranges for ARCH_FORCE_MAX_ORDER some of which are insanely allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.
Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.
Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.
--- arch/powerpc/Kconfig | 6 ------ 1 file changed, 6 deletions(-)
arch/powerpc/Kconfig +0 -6
@@ -897,17 +897,11 @@ config DATA_SHIFT config ARCH_FORCE_MAX_ORDER int "Order of maximal physically contiguous allocations" - range 7 8 if PPC64 && PPC_64K_PAGES default "8" if PPC64 && PPC_64K_PAGES - range 12 12 if PPC64 && !PPC_64K_PAGES default "12" if PPC64 && !PPC_64K_PAGES - range 8 63 if PPC32 && PPC_16K_PAGES default "8" if PPC32 && PPC_16K_PAGES - range 6 63 if PPC32 && PPC_64K_PAGES default "6" if PPC32 && PPC_64K_PAGES - range 4 63 if PPC32 && PPC_256K_PAGES default "4" if PPC32 && PPC_256K_PAGES - range 10 63 default "10" help The kernel page allocator limits the size of maximal physically
Signature · 1 line
2.35.1
PATCH v2 11/14 sh: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/sh/mm/Kconfig | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
arch/sh/mm/Kconfig +9 -8
@@ -19,8 +19,7 @@ config PAGE_OFFSET default "0x00000000" config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" - range 8 63 if PAGE_SIZE_16KB + int "Order of maximal physically contiguous allocations" default "8" if PAGE_SIZE_16KB range 6 63 if PAGE_SIZE_64KB default "6" if PAGE_SIZE_64KB
@@ -28,16 +27,18 @@ config ARCH_FORCE_MAX_ORDER default "13" if !MMU default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. The page size is not necessarily 4KB. Keep this in mind when choosing a value for this option. + Don't change if unsure. + config MEMORY_START hex "Physical memory start address" default "0x08000000"
Signature · 1 line
2.35.1
Re: [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text
Quoted 18 lines · Mike Rapoport
From: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of
ARCH_FORCE_MAX_ORDERare not even close to describe this configuration option.Update both to actually describe what this option does.
Signed-off-by Mike Rapoport (IBM) <[email protected]>--- arch/sh/mm/Kconfig | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)arch/sh/mm/Kconfig +0
-0
arch/sh/mm/Kconfig config PAGE_OFFSET · line 23
Quoted 5 lines
arch/sh/mm/Kconfig +0
-2@@ -19,8 +19,7 @@ config PAGE_OFFSET default "0x00000000" config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" - range 8 63 if PAGE_SIZE_16KB
This range is dropped in current patch, but the other ranges are dropped in the next patch. But feel free to ignore this since ultimately the ranges are all dropped.
Quoted 31 lines
arch/sh/mm/Kconfig +9
-6+ int "Order of maximal physically contiguous allocations" default "8" if PAGE_SIZE_16KB range 6 63 if PAGE_SIZE_64KB default "6" if PAGE_SIZE_64KB@@ -28,16 +27,18 @@ config ARCH_FORCE_MAX_ORDER default "13" if !MMU default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. The page size is not necessarily 4KB. Keep this in mind when choosing a value for this option. + Don't change if unsure. + config MEMORY_START hex "Physical memory start address" default "0x08000000"Signature · 1 line
2.35.1
--
Best Regards,
Yan, Zi
PATCH v2 12/14 sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
sh defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.
Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.
Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.
--- arch/sh/mm/Kconfig | 2 -- 1 file changed, 2 deletions(-)
arch/sh/mm/Kconfig +0 -2
@@ -21,9 +21,7 @@ config PAGE_OFFSET config ARCH_FORCE_MAX_ORDER int "Order of maximal physically contiguous allocations" default "8" if PAGE_SIZE_16KB - range 6 63 if PAGE_SIZE_64KB default "6" if PAGE_SIZE_64KB - range 10 63 default "13" if !MMU default "10" help
Signature · 1 line
2.35.1
PATCH v2 13/14 sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/sparc/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/sparc/Kconfig +9 -7
@@ -270,15 +270,17 @@ config ARCH_SPARSEMEM_DEFAULT def_bool y if SPARC64 config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" + int "Order of maximal physically contiguous allocations" default "12" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. + + Don't change if unsure. if SPARC64 || COMPILE_TEST source "kernel/power/Kconfig"
Signature · 1 line
2.35.1
PATCH v2 14/14 xtensa: reword ARCH_FORCE_MAX_ORDER prompt and help text
In reply to Mike RapoportFrom: "Mike Rapoport (IBM)" <[email protected]>
The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option.
Update both to actually describe what this option does.
--- arch/xtensa/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
arch/xtensa/Kconfig +9 -7
@@ -772,15 +772,17 @@ config HIGHMEM If unsure, say Y. config ARCH_FORCE_MAX_ORDER - int "Maximum zone order" + int "Order of maximal physically contiguous allocations" default "10" help - The kernel memory allocator divides physically contiguous memory - blocks into "zones", where each zone is a power of two number of - pages. This option selects the largest power of two that the kernel - keeps in the memory allocator. If you need to allocate very large - blocks of physically contiguous memory, then you may need to - increase this value. + The kernel page allocator limits the size of maximal physically + contiguous allocations. The limit is called MAX_ORDER and it + defines the maximal power of two of number of pages that can be + allocated as a single contiguous block. This option allows + overriding the default setting when ability to allocate very + large blocks of physically contiguous memory is required. + + Don't change if unsure. endmenu
Signature · 1 line
2.35.1
Quoted 53 lines · Mike Rapoport
From: "Mike Rapoport (IBM)" <[email protected]>
Hi,
Several architectures have
ARCH_FORCE_MAX_ORDERin theirKconfigand they all have wrong and misleading prompt and help text for this option.Besides, some define insane limits for possible values of
ARCH_FORCE_MAX_ORDER, some carefully define ranges only for a subset of possible configurations, some make this option configurable by users for no good reason.This set updates the prompt and help text everywhere and does its best to update actual definitions of ranges where applicable.
kbuild generated a bunch of false positives because it assigns -1 to
ARCH_FORCE_MAX_ORDER, hopefully this will be fixed soon.v2:
* arm64: show prompt forARCH_FORCE_MAX_ORDERonly if EXPERT (Catalin)
* Add Acked- and Reviewed-by tags (thanks Geert, Kirill and Max)v1: https://lore.kernel.org/all/[email protected]
Mike Rapoport (IBM) (14):
arm: rewordARCH_FORCE_MAX_ORDERprompt and help text
arm64: drop ranges in definition ofARCH_FORCE_MAX_ORDER
arm64: rewordARCH_FORCE_MAX_ORDERprompt and help text
csky: dropARCH_FORCE_MAX_ORDER
ia64: don't allow users to overrideARCH_FORCE_MAX_ORDER
m68k: rewordARCH_FORCE_MAX_ORDERprompt and help text
nios2: rewordARCH_FORCE_MAX_ORDERprompt and help text
nios2: drop ranges for definition ofARCH_FORCE_MAX_ORDER
powerpc: rewordARCH_FORCE_MAX_ORDERprompt and help text
powerpc: drop ranges for definition ofARCH_FORCE_MAX_ORDER
sh: rewordARCH_FORCE_MAX_ORDERprompt and help text
sh: drop ranges for definition ofARCH_FORCE_MAX_ORDER
sparc: rewordARCH_FORCE_MAX_ORDERprompt and help text
xtensa: rewordARCH_FORCE_MAX_ORDERprompt and help textarch/arm/Kconfig | 16 +++++++++------- arch/arm64/Kconfig | 27 ++++++++++++--------------- arch/csky/Kconfig | 4 ---- arch/ia64/Kconfig | 3 +-- arch/m68k/Kconfig.cpu | 16 +++++++++------- arch/nios2/Kconfig | 17 +++++++++-------- arch/powerpc/Kconfig | 22 +++++++++------------- arch/sh/mm/Kconfig | 19 +++++++++---------- arch/sparc/Kconfig | 16 +++++++++------- arch/xtensa/Kconfig | 16 +++++++++------- 10 files changed, 76 insertions(+), 80 deletions(-)
Quoted 1 line
base-commit:
51551d71edbc998fd8c8afa7312db3d270f5998e
LGTM, thanks. Reviewed-by: Zi Yan <[email protected]>
--
Best Regards,
Yan, Zi
Quoted 55 lines · Zi Yan
Quoted 53 lines · Mike Rapoport
From: "Mike Rapoport (IBM)" <[email protected]>
Hi,
Several architectures have
ARCH_FORCE_MAX_ORDERin theirKconfigand they all have wrong and misleading prompt and help text for this option.Besides, some define insane limits for possible values of
ARCH_FORCE_MAX_ORDER, some carefully define ranges only for a subset of possible configurations, some make this option configurable by users for no good reason.This set updates the prompt and help text everywhere and does its best to update actual definitions of ranges where applicable.
kbuild generated a bunch of false positives because it assigns -1 to
ARCH_FORCE_MAX_ORDER, hopefully this will be fixed soon.v2:
* arm64: show prompt forARCH_FORCE_MAX_ORDERonly if EXPERT (Catalin)
* Add Acked- and Reviewed-by tags (thanks Geert, Kirill and Max)v1: https://lore.kernel.org/all/[email protected]
Mike Rapoport (IBM) (14):
arm: rewordARCH_FORCE_MAX_ORDERprompt and help text
arm64: drop ranges in definition ofARCH_FORCE_MAX_ORDER
arm64: rewordARCH_FORCE_MAX_ORDERprompt and help text
csky: dropARCH_FORCE_MAX_ORDER
ia64: don't allow users to overrideARCH_FORCE_MAX_ORDER
m68k: rewordARCH_FORCE_MAX_ORDERprompt and help text
nios2: rewordARCH_FORCE_MAX_ORDERprompt and help text
nios2: drop ranges for definition ofARCH_FORCE_MAX_ORDER
powerpc: rewordARCH_FORCE_MAX_ORDERprompt and help text
powerpc: drop ranges for definition ofARCH_FORCE_MAX_ORDER
sh: rewordARCH_FORCE_MAX_ORDERprompt and help text
sh: drop ranges for definition ofARCH_FORCE_MAX_ORDER
sparc: rewordARCH_FORCE_MAX_ORDERprompt and help text
xtensa: rewordARCH_FORCE_MAX_ORDERprompt and help textarch/arm/Kconfig | 16 +++++++++------- arch/arm64/Kconfig | 27 ++++++++++++--------------- arch/csky/Kconfig | 4 ---- arch/ia64/Kconfig | 3 +-- arch/m68k/Kconfig.cpu | 16 +++++++++------- arch/nios2/Kconfig | 17 +++++++++-------- arch/powerpc/Kconfig | 22 +++++++++------------- arch/sh/mm/Kconfig | 19 +++++++++---------- arch/sparc/Kconfig | 16 +++++++++------- arch/xtensa/Kconfig | 16 +++++++++------- 10 files changed, 76 insertions(+), 80 deletions(-)
Quoted 3 lines
Quoted 1 line
base-commit:
51551d71edbc998fd8c8afa7312db3d270f5998eLGTM, thanks. Reviewed-by: Zi Yan <[email protected]>
Thanks!
And thanks for spotting the mistakes in arm64 and sh patches.
Quoted 3 lines
--
Best Regards,
Yan, Zi
Signature · 2 lines
Sincerely yours, Mike.