[RFC PATCH v1 5/5] arm64/mm: Elide tlbi in contpte_convert() under BBML2
Mikołaj Lenczewski
miko.lenczewski at arm.com
Wed Dec 11 07:45:06 PST 2024
If we support BBM level 2, we can potentially avoid an intermediate
TLB invalidation, as hardware is capable of managing the TLB itself
in this situation. Hardware will either silently clear out the
offending entry, or will take a TLB Conflict Abort Exception.
Note that such aborts should not occur on Arm hardware and indeed
were not seen on any of the benchmarked systems.
Eliding the invalidation results in a 12% improvement on a
microbenchmark which targeted the worst case of contpte_convert(), which
represents an 80% reduction in the overhead of contpte_convert().
Note also that this patch is pending review to ensure that it is
architecturally valid, and we are working with Arm architects to
validate this patch.
Signed-off-by: Mikołaj Lenczewski <miko.lenczewski at arm.com>
---
arch/arm64/mm/contpte.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/mm/contpte.c b/arch/arm64/mm/contpte.c
index fc927be800ee..009690770415 100644
--- a/arch/arm64/mm/contpte.c
+++ b/arch/arm64/mm/contpte.c
@@ -72,9 +72,6 @@ static void contpte_convert(struct mm_struct *mm, unsigned long addr,
__flush_tlb_range(&vma, start_addr, addr, PAGE_SIZE, true, 3);
__set_ptes(mm, start_addr, start_ptep, pte, CONT_PTES);
-
- if (system_supports_bbml2())
- __flush_tlb_range(&vma, start_addr, addr, PAGE_SIZE, true, 3);
}
void __contpte_try_fold(struct mm_struct *mm, unsigned long addr,
--
2.45.2
More information about the linux-arm-kernel
mailing list