Skip to content

Commit 060a2c9

Browse files
committed
arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP
Revert the HUGETLB_PAGE_FREE_VMEMMAP selection from commit 1e63ac0 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") but keep the flush_dcache_page() compound_head() change as it aligns with the corresponding check in the __sync_icache_dcache() function. The original config option was renamed in commit 47010c0 ("mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*") to HUGETLB_PAGE_OPTIMIZE_VMEMMAP and the flush_dcache_page() check was further simplified by commit 2da1c30 ("mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled()"). The reason for the revert is that the generic vmemmap_remap_pte() function changes both the permissions (writeable to read-only) and the output address (pfn) of the vmemmap ptes. This is deemed UNPREDICTABLE by the Arm architecture without a break-before-make sequence (make the PTE invalid, TLBI, write the new valid PTE). However, such sequence is not possible since the vmemmap may be concurrently accessed by the kernel. Disable the optimisation until a better solution is found. Fixes: 1e63ac0 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") Cc: <[email protected]> # 5.19.x Cc: Muchun Song <[email protected]> Cc: Will Deacon <[email protected]> Cc: Anshuman Khandual <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Anshuman Khandual <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent b61b82f commit 060a2c9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ config ARM64
100100
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
101101
select ARCH_WANT_FRAME_POINTERS
102102
select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
103-
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
104103
select ARCH_WANT_LD_ORPHAN_WARN
105104
select ARCH_WANTS_NO_INSTR
106105
select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES

0 commit comments

Comments
 (0)