Skip to content

Commit ec1c3b9

Browse files
committed
arm64: tlbflush: Rename MAX_TLBI_OPS
Perhaps unsurprisingly, I-cache invalidations suffer from performance issues similar to TLB invalidations on certain systems. TLB and I-cache maintenance all result in DVM on the mesh, which is where the real bottleneck lies. Rename the heuristic to point the finger at DVM, such that it may be reused for limiting I-cache invalidations. Reviewed-by: Gavin Shan <[email protected]> Tested-by: Gavin Shan <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 7b424ff commit ec1c3b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/arm64/include/asm/tlbflush.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
333333
* This is meant to avoid soft lock-ups on large TLB flushing ranges and not
334334
* necessarily a performance improvement.
335335
*/
336-
#define MAX_TLBI_OPS PTRS_PER_PTE
336+
#define MAX_DVM_OPS PTRS_PER_PTE
337337

338338
/*
339339
* __flush_tlb_range_op - Perform TLBI operation upon a range
@@ -413,12 +413,12 @@ static inline void __flush_tlb_range(struct vm_area_struct *vma,
413413

414414
/*
415415
* When not uses TLB range ops, we can handle up to
416-
* (MAX_TLBI_OPS - 1) pages;
416+
* (MAX_DVM_OPS - 1) pages;
417417
* When uses TLB range ops, we can handle up to
418418
* (MAX_TLBI_RANGE_PAGES - 1) pages.
419419
*/
420420
if ((!system_supports_tlb_range() &&
421-
(end - start) >= (MAX_TLBI_OPS * stride)) ||
421+
(end - start) >= (MAX_DVM_OPS * stride)) ||
422422
pages >= MAX_TLBI_RANGE_PAGES) {
423423
flush_tlb_mm(vma->vm_mm);
424424
return;
@@ -451,7 +451,7 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end
451451
{
452452
unsigned long addr;
453453

454-
if ((end - start) > (MAX_TLBI_OPS * PAGE_SIZE)) {
454+
if ((end - start) > (MAX_DVM_OPS * PAGE_SIZE)) {
455455
flush_tlb_all();
456456
return;
457457
}

0 commit comments

Comments
 (0)