Thread (3 messages) flat view 3 messages, 3 authors, 2021-03-08

Re: [PATCH] arm64/mm: Drop THP conditionality from FORCE_MAX_ZONEORDER

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2021-03-01 15:18:59
Also in: lkml

On Mon, Mar 01, 2021 at 04:55:14PM +0530, Anshuman Khandual wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 9cd33c7be429..d4690326274a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1156,8 +1156,8 @@ config XEN
 
 config FORCE_MAX_ZONEORDER
 	int
-	default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
-	default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
+	default "14" if ARM64_64K_PAGES
+	default "12" if ARM64_16K_PAGES
 	default "11"
 	help
 	  The kernel memory allocator divides physically contiguous memory
I think this makes sense. The original "14" was added by Steve C in
commit d03bb1455f3a ("ARM64: mm: Raise MAX_ORDER for 64KB pages and
THP.") back in 3.11. It looks like hugetlbfs (and the HUGETLB_PAGE_ORDER
definition) was added in the same kernel but we somehow missed the
!TRANSPARENT_HUGEPAGE case and smaller page order. The warning in
__fragmentation_index() was added much later in 4.14.

Anyway, the patch looks fine to me, we could apply it to some past
stable kernels:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

An alternative would have be to add a dependency on both
TRANSPARENT_HUGEPAGE and HUGETLB_PAGE but I'm not sure it's worth it.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help