Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: tndaveDate: Mon, 24 Oct 2016 11:31:14 -0700 > > > On 10/24/2016 10:45 AM, David Miller wrote: >> From: Tushar Dave >> Date: Mon, 10 Oct 2016 11:12:02 -0700 >> >>> From: Dave Kleikamp >>> >>> This change allows ATU (new IOMMU) in SPARC systems to request >>> large (32M) contiguous memory during boot for creating IOTSB backing >>> store. >>> >>> Signed-off-by: Dave Kleikamp >>> Signed-off-by: Tushar Dave >> >> If you need 32MB allocations, wouldn't a max zone order of 12 be >> sufficient? (8K << 12 == 32MB) > Yes, but config FORCE_MAX_ZONEORDER is actually maximum order plus > one. > For example, a value of 13 means that the largest free memory block is > 2^12 pages. For 32MB we need 2^12 8K pages, hence FORCE_MAX_ZONEORDER > must be MAX_ORDER + 1 i.e. 13. Ok, thanks for explaining.
Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: tndave Date: Mon, 24 Oct 2016 11:31:14 -0700 > > > On 10/24/2016 10:45 AM, David Miller wrote: >> From: Tushar Dave >> Date: Mon, 10 Oct 2016 11:12:02 -0700 >> >>> From: Dave Kleikamp >>> >>> This change allows ATU (new IOMMU) in SPARC systems to request >>> large (32M) contiguous memory during boot for creating IOTSB backing >>> store. >>> >>> Signed-off-by: Dave Kleikamp >>> Signed-off-by: Tushar Dave >> >> If you need 32MB allocations, wouldn't a max zone order of 12 be >> sufficient? (8K << 12 == 32MB) > Yes, but config FORCE_MAX_ZONEORDER is actually maximum order plus > one. > For example, a value of 13 means that the largest free memory block is > 2^12 pages. For 32MB we need 2^12 8K pages, hence FORCE_MAX_ZONEORDER > must be MAX_ORDER + 1 i.e. 13. Ok, thanks for explaining.
Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
On 10/24/2016 10:45 AM, David Miller wrote: From: Tushar DaveDate: Mon, 10 Oct 2016 11:12:02 -0700 From: Dave Kleikamp This change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave If you need 32MB allocations, wouldn't a max zone order of 12 be sufficient? (8K << 12 == 32MB) Yes, but config FORCE_MAX_ZONEORDER is actually maximum order plus one. For example, a value of 13 means that the largest free memory block is 2^12 pages. For 32MB we need 2^12 8K pages, hence FORCE_MAX_ZONEORDER must be MAX_ORDER + 1 i.e. 13. Thanks. -Tushar
Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
On 10/24/2016 10:45 AM, David Miller wrote: From: Tushar Dave Date: Mon, 10 Oct 2016 11:12:02 -0700 From: Dave Kleikamp This change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave If you need 32MB allocations, wouldn't a max zone order of 12 be sufficient? (8K << 12 == 32MB) Yes, but config FORCE_MAX_ZONEORDER is actually maximum order plus one. For example, a value of 13 means that the largest free memory block is 2^12 pages. For 32MB we need 2^12 8K pages, hence FORCE_MAX_ZONEORDER must be MAX_ORDER + 1 i.e. 13. Thanks. -Tushar
Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Tushar DaveDate: Mon, 10 Oct 2016 11:12:02 -0700 > From: Dave Kleikamp > > This change allows ATU (new IOMMU) in SPARC systems to request > large (32M) contiguous memory during boot for creating IOTSB backing > store. > > Signed-off-by: Dave Kleikamp > Signed-off-by: Tushar Dave If you need 32MB allocations, wouldn't a max zone order of 12 be sufficient? (8K << 12 == 32MB)
Re: [PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Tushar Dave Date: Mon, 10 Oct 2016 11:12:02 -0700 > From: Dave Kleikamp > > This change allows ATU (new IOMMU) in SPARC systems to request > large (32M) contiguous memory during boot for creating IOTSB backing > store. > > Signed-off-by: Dave Kleikamp > Signed-off-by: Tushar Dave If you need 32MB allocations, wouldn't a max zone order of 12 be sufficient? (8K << 12 == 32MB)
[PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Dave KleikampThis change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave --- arch/sparc/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index f5d60f1..a7482bc 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -90,6 +90,10 @@ config ARCH_DEFCONFIG config ARCH_PROC_KCORE_TEXT def_bool y +config ARCH_ATU + bool + default y if SPARC64 + config IOMMU_HELPER bool default y if SPARC64 @@ -305,6 +309,20 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y if SPARC64 +config FORCE_MAX_ZONEORDER + int "Maximum zone order" + default "13" + 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. + + This config option is actually maximum order plus one. For example, + a value of 13 means that the largest free memory block is 2^12 pages. + source "mm/Kconfig" if SPARC64 -- 1.9.1
[PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Dave Kleikamp This change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave --- arch/sparc/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index f5d60f1..a7482bc 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -90,6 +90,10 @@ config ARCH_DEFCONFIG config ARCH_PROC_KCORE_TEXT def_bool y +config ARCH_ATU + bool + default y if SPARC64 + config IOMMU_HELPER bool default y if SPARC64 @@ -305,6 +309,20 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y if SPARC64 +config FORCE_MAX_ZONEORDER + int "Maximum zone order" + default "13" + 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. + + This config option is actually maximum order plus one. For example, + a value of 13 means that the largest free memory block is 2^12 pages. + source "mm/Kconfig" if SPARC64 -- 1.9.1
[RFC PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Dave KleikampThis change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave --- arch/sparc/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 59b0960..338282d 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -91,6 +91,10 @@ config ARCH_DEFCONFIG config ARCH_PROC_KCORE_TEXT def_bool y +config ARCH_ATU + bool + default y if SPARC64 + config IOMMU_HELPER bool default y if SPARC64 @@ -306,6 +310,20 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y if SPARC64 +config FORCE_MAX_ZONEORDER + int "Maximum zone order" + default "13" + 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. + + This config option is actually maximum order plus one. For example, + a value of 13 means that the largest free memory block is 2^12 pages. + source "mm/Kconfig" if SPARC64 -- 1.9.1
[RFC PATCH 1/6] sparc64: Add FORCE_MAX_ZONEORDER and default to 13
From: Dave Kleikamp This change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave --- arch/sparc/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 59b0960..338282d 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -91,6 +91,10 @@ config ARCH_DEFCONFIG config ARCH_PROC_KCORE_TEXT def_bool y +config ARCH_ATU + bool + default y if SPARC64 + config IOMMU_HELPER bool default y if SPARC64 @@ -306,6 +310,20 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y if SPARC64 +config FORCE_MAX_ZONEORDER + int "Maximum zone order" + default "13" + 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. + + This config option is actually maximum order plus one. For example, + a value of 13 means that the largest free memory block is 2^12 pages. + source "mm/Kconfig" if SPARC64 -- 1.9.1