linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER
@ 2023-03-24  5:22 Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 01/14] arm: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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/20230323092156.2545741-1-rppt@kernel.org

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
-- 
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


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v2 01/14] arm: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/arm/Kconfig | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 929e646e84b9..0b15384c62e6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 01/14] arm: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
---
 arch/arm64/Kconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e60baf7859d1..7324032af859 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 01/14] arm: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24 13:48   ` Zi Yan
  2023-03-24  5:22 ` [PATCH v2 04/14] csky: drop ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/arm64/Kconfig | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7324032af859..cdaf52ac4018 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 04/14] csky: drop ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (2 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 05/14] ia64: don't allow users to override ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/csky/Kconfig | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index c694fac43bed..00379a843c37 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 05/14] ia64: don't allow users to override ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (3 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 04/14] csky: drop ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 06/14] m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/ia64/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 0d2f41fa56ee..b61437cae162 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -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"
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 06/14] m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (4 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 05/14] ia64: don't allow users to override ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 07/14] nios2: " Mike Rapoport
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/Kconfig.cpu | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index c9df6572133f..e530bc8f240f 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 07/14] nios2: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (5 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 06/14] m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 08/14] nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/nios2/Kconfig | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 89708b95978c..fcaa6bbda3fc 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -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
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 08/14] nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (6 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 07/14] nios2: " Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 09/14] powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/nios2/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index fcaa6bbda3fc..e5936417d3cd 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 09/14] powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (7 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 08/14] nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 10/14] powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/powerpc/Kconfig | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 24d56536b269..c0095bf795ca 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 10/14] powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (8 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 09/14] powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/powerpc/Kconfig | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index c0095bf795ca..419be4a71004 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (9 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 10/14] powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24 14:28   ` Zi Yan
  2023-03-24  5:22 ` [PATCH v2 12/14] sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/sh/mm/Kconfig | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 40271090bd7d..fb15ba1052ba 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -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"
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 12/14] sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (10 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 13/14] sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/sh/mm/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index fb15ba1052ba..511c17aede4a 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 13/14] sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (11 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 12/14] sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24  5:22 ` [PATCH v2 14/14] xtensa: " Mike Rapoport
  2023-03-24 14:30 ` [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Zi Yan
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/sparc/Kconfig | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index e3242bf5a8df..959e43a1aaca 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -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"
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 14/14] xtensa: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (12 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 13/14] sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24  5:22 ` Mike Rapoport
  2023-03-24 14:30 ` [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Zi Yan
  14 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Mike Rapoport, Rich Felker, Russell King,
	Will Deacon, Yoshinori Sato, Zi Yan, linux-arm-kernel,
	linux-csky, linux-ia64, linux-kernel, linux-m68k, linux-mm,
	linux-sh, linux-xtensa, linuxppc-dev, sparclinux

From: "Mike Rapoport (IBM)" <rppt@kernel.org>

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.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 arch/xtensa/Kconfig | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3eee334ba873..3c6e5471f025 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -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
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 ` [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24 13:48   ` Zi Yan
  0 siblings, 0 replies; 19+ messages in thread
From: Zi Yan @ 2023-03-24 13:48 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Andrew Morton, Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Rich Felker, Russell King, Will Deacon,
	Yoshinori Sato, linux-arm-kernel, linux-csky, linux-ia64,
	linux-kernel, linux-m68k, linux-mm, linux-sh, linux-xtensa,
	linuxppc-dev, sparclinux

[-- Attachment #1: Type: text/plain, Size: 2763 bytes --]

On 24 Mar 2023, at 1:22, Mike Rapoport wrote:

> From: "Mike Rapoport (IBM)" <rppt@kernel.org>
>
> 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.
>
> Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
>  arch/arm64/Kconfig | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 7324032af859..cdaf52ac4018 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -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.

>  	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
> -- 
> 2.35.1


--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text
  2023-03-24  5:22 ` [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
@ 2023-03-24 14:28   ` Zi Yan
  0 siblings, 0 replies; 19+ messages in thread
From: Zi Yan @ 2023-03-24 14:28 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Andrew Morton, Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Rich Felker, Russell King, Will Deacon,
	Yoshinori Sato, linux-arm-kernel, linux-csky, linux-ia64,
	linux-kernel, linux-m68k, linux-mm, linux-sh, linux-xtensa,
	linuxppc-dev, sparclinux

[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]

On 24 Mar 2023, at 1:22, Mike Rapoport wrote:

> From: "Mike Rapoport (IBM)" <rppt@kernel.org>
>
> 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.
>
> Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
>  arch/sh/mm/Kconfig | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
> index 40271090bd7d..fb15ba1052ba 100644
> --- a/arch/sh/mm/Kconfig
> +++ b/arch/sh/mm/Kconfig
> @@ -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.

> +	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"
> -- 
> 2.35.1


--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER
  2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
                   ` (13 preceding siblings ...)
  2023-03-24  5:22 ` [PATCH v2 14/14] xtensa: " Mike Rapoport
@ 2023-03-24 14:30 ` Zi Yan
  2023-03-24 16:48   ` Mike Rapoport
  14 siblings, 1 reply; 19+ messages in thread
From: Zi Yan @ 2023-03-24 14:30 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Andrew Morton, Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Rich Felker, Russell King, Will Deacon,
	Yoshinori Sato, linux-arm-kernel, linux-csky, linux-ia64,
	linux-kernel, linux-m68k, linux-mm, linux-sh, linux-xtensa,
	linuxppc-dev, sparclinux

[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]

On 24 Mar 2023, at 1:22, Mike Rapoport wrote:

> From: "Mike Rapoport (IBM)" <rppt@kernel.org>
>
> 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/20230323092156.2545741-1-rppt@kernel.org
>
> 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

LGTM, thanks. Reviewed-by: Zi Yan <ziy@nvidia.com>

--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER
  2023-03-24 14:30 ` [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Zi Yan
@ 2023-03-24 16:48   ` Mike Rapoport
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Rapoport @ 2023-03-24 16:48 UTC (permalink / raw)
  To: Zi Yan
  Cc: Andrew Morton, Arnd Bergmann, Catalin Marinas, Christophe Leroy,
	David S. Miller, Dinh Nguyen, Geert Uytterhoeven, Guo Ren,
	John Paul Adrian Glaubitz, Kirill A. Shutemov, Max Filippov,
	Michael Ellerman, Rich Felker, Russell King, Will Deacon,
	Yoshinori Sato, linux-arm-kernel, linux-csky, linux-ia64,
	linux-kernel, linux-m68k, linux-mm, linux-sh, linux-xtensa,
	linuxppc-dev, sparclinux

On Fri, Mar 24, 2023 at 10:30:07AM -0400, Zi Yan wrote:
> On 24 Mar 2023, at 1:22, Mike Rapoport wrote:
> 
> > From: "Mike Rapoport (IBM)" <rppt@kernel.org>
> >
> > 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/20230323092156.2545741-1-rppt@kernel.org
> >
> > 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
> 
> LGTM, thanks. Reviewed-by: Zi Yan <ziy@nvidia.com>

Thanks!

And thanks for spotting the mistakes in arm64 and sh patches.
 
> --
> Best Regards,
> Yan, Zi

-- 
Sincerely yours,
Mike.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-03-24 16:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24  5:22 [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 01/14] arm: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 03/14] arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24 13:48   ` Zi Yan
2023-03-24  5:22 ` [PATCH v2 04/14] csky: drop ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 05/14] ia64: don't allow users to override ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 06/14] m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 07/14] nios2: " Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 08/14] nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 09/14] powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 10/14] powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 11/14] sh: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24 14:28   ` Zi Yan
2023-03-24  5:22 ` [PATCH v2 12/14] sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 13/14] sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text Mike Rapoport
2023-03-24  5:22 ` [PATCH v2 14/14] xtensa: " Mike Rapoport
2023-03-24 14:30 ` [PATCH v2 00/14] arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER Zi Yan
2023-03-24 16:48   ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).