Skip to content

Avoid synchronous TLB invalidation for intermediate page-table entries on arm64

Will Deacon linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12arm64: tlb: Use last-level invalidation in flush_tlb_kernel_range()arch/arm64/include/asm/tlbflush.h+1 -10 replies
2/12arm64: tlb: Add DSB ISHST prior to TLBI in __flush_tlb_[kernel_]pgtable()arch/arm64/include/asm/tlbflush.h+2 -00 replies
3/12arm64: pgtable: Implement p[mu]d_valid() and check in set_p[mu]d()arch/arm64/include/asm/pgtable.h+8 -20 replies
4/12arm64: tlb: Justify non-leaf invalidation in flush_tlb_range()arch/arm64/include/asm/tlbflush.h+4 -00 replies
5/12arm64: tlbflush: Allow stride to be specified for __flush_tlb_range()arch/arm64/include/asm/tlb.h arch/arm64/include/asm/tlbflush.h+10 -70 replies
6/12arm64: tlb: Remove redundant !CONFIG_HAVE_RCU_TABLE_FREE codearch/arm64/include/asm/tlb.h+3 -90 replies
7/12asm-generic/tlb: Guard with #ifdef CONFIG_MMUinclude/asm-generic/tlb.h+4 -00 replies
8/12asm-generic/tlb: Track freeing of page-table directories in struct mmu_gatherinclude/asm-generic/tlb.h+23 -80 replies
9/12asm-generic/tlb: Track which levels of the page tables have been clearedinclude/asm-generic/tlb.h mm/memory.c+53 -91 reply
10/12arm64: tlb: Adjust stride and type of TLBI according to mmu_gatherarch/arm64/include/asm/tlb.h+10 -90 replies
11/12arm64: tlb: Avoid synchronous TLBIs when freeing page tablesarch/arm64/Kconfig arch/arm64/include/asm/tlb.h arch/arm64/include/asm/tlbflush.h+1 -140 replies
12/12arm64: tlb: Rewrite stale comment in asm/tlbflush.harch/arm64/include/asm/tlbflush.h+55 -250 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter Zijlstra (Intel)Nicholas Piggin
SeriesA-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12A-b
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] Avoid synchronous TLB invalidation for intermediate page-table entries on arm64

Hello again,

This is v1 of the RFC I previously posted here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2018-August/597821.html

The main changes include:

* Rewrite the comment in tlbflush.h to explain the various functions and justify the barrier semantics

* Fix the "flush entire ASID" heuristic to work with !4K page sizes

* Fixed the build on sh (well, it fails somewhere else that isn't my fault)

* Report PxD_SHIFT instead of PxD_SIZE via tlb_get_unmap_shift()

It's also had a lot more testing, but has held up nicely so far on arm64. I haven't figured out how to merge this yet, but I'll probably end up pulling the core changes out onto a separate branch.

Cheers,

Will

--->8

Peter Zijlstra (1):
asm-generic/tlb: Track freeing of page-table directories in struct
mmu_gather

Will Deacon (11):
arm64: tlb: Use last-level invalidation in flush_tlb_kernel_range()
arm64: tlb: Add DSB ISHST prior to TLBI in

    __flush_tlb_[kernel_]pgtable()

arm64: pgtable: Implement p[mu]d_valid() and check in set_p[mu]d()
arm64: tlb: Justify non-leaf invalidation in flush_tlb_range()
arm64: tlbflush: Allow stride to be specified for __flush_tlb_range()
arm64: tlb: Remove redundant !CONFIG_HAVE_RCU_TABLE_FREE code asm-generic/tlb: Guard with #ifdef CONFIG_MMU asm-generic/tlb: Track which levels of the page tables have been
cleared
arm64: tlb: Adjust stride and type of TLBI according to mmu_gather
arm64: tlb: Avoid synchronous TLBIs when freeing page tables
arm64: tlb: Rewrite stale comment in asm/tlbflush.h

 arch/arm64/Kconfig                |   1 +
 arch/arm64/include/asm/pgtable.h  |  10 +++-
 arch/arm64/include/asm/tlb.h      |  34 +++++-------
 arch/arm64/include/asm/tlbflush.h | 112 ++++++++++++++++++++++++--------------
 include/asm-generic/tlb.h         |  85 +++++++++++++++++++++++++----
 mm/memory.c                       |   4 +-
 6 files changed, 168 insertions(+), 78 deletions(-)
Signature · 1 line
2.1.4