Skip to content

TLB/I$ flush cleanups and improvements

Gary Guo linux-riscv 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 23 repliesIn review
  2. v34 patches 3 repliesSuperseded
  3. v24 patches 2 repliesSuperseded

Changes in v4 from the cover letter

- Document tlbi_max_ops and tlbi_method in kernel-parameter.txt
- Split IPI-based shootdown implementation into its own commit

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5riscv: move flush_icache_{all,mm} to cacheflush.carch/riscv/include/asm/cacheflush.h arch/riscv/kernel/smp.c arch/riscv/mm/cacheflush.c+62 -502 replies
2/5riscv: move switch_mm to its own filearch/riscv/include/asm/mmu_context.h arch/riscv/mm/Makefile arch/riscv/mm/context.c+74 -573 replies
3/5riscv: fix sbi_remote_sfence_vma{,_asid}.arch/riscv/include/asm/sbi.h+12 -72 replies
4/5riscv: rewrite tlb flush for performanceDocumentation/admin-guide/kernel-parameters.rst Documentation/admin-guide/kernel-parameters.txt arch/riscv/include/asm/pgtable.h +5 more+178 -485 replies
5/5riscv: implement IPI-based remote TLB shootdownDocumentation/admin-guide/kernel-parameters.txt arch/riscv/mm/tlbflush.c+98 -66 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchAtish PatraChristoph HellwigAnup Patel
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5T-b
5/5T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/5] TLB/I$ flush cleanups and improvements

From: Gary Guo <[email protected]>

This is the v4 of the general TLB/I$ flush improvement series.
I still have tlbi_method=ipi being the default as opposed to what Atish suggests, as:
* There are still usage of BBL in the wild
* OpenSBI's support isn't made into stable yet.
* OpenSBI's support on the dev branch has some racing issues yet to resolve.

Once most SBIs used in the wild can handle remote shootdown properly we can the submit another patch to change the default value to tlbi_method=sbi again.

This patches does:
1. Move long and expensive functions aways from header files.
2. Fix missing arguments for SBI calls.
3. Performance improvements for TLB flush.
4. Implement IPI-based remote shootdown in case the SBI ignores ASID and vaddr operands.

Changes since v3:
- Document tlbi_max_ops and tlbi_method in kernel-parameter.txt
- Split IPI-based shootdown implementation into its own commit

Changes since v2:
- Replace __setup with early_param
- Rebase on top of for-next

Changes since v1:
- Use kernel boot parameters instead of Kconfig
- Style fixes

Gary Guo (5):
riscv: move flush_icache_{all,mm} to cacheflush.c
riscv: move switch_mm to its own file
riscv: fix sbi_remote_sfence_vma{,_asid}.
riscv: rewrite tlb flush for performance
riscv: implement IPI-based remote TLB shootdown

 .../admin-guide/kernel-parameters.rst         |   1 +
 .../admin-guide/kernel-parameters.txt         |  13 ++
 arch/riscv/include/asm/cacheflush.h           |   2 +-
 arch/riscv/include/asm/mmu_context.h          |  59 +----
 arch/riscv/include/asm/pgtable.h              |   2 +-
 arch/riscv/include/asm/sbi.h                  |  19 +-
 arch/riscv/include/asm/tlbflush.h             |  76 +++----
 arch/riscv/kernel/smp.c                       |  49 ----
 arch/riscv/mm/Makefile                        |   2 +
 arch/riscv/mm/cacheflush.c                    |  61 +++++
 arch/riscv/mm/context.c                       |  77 +++++++
 arch/riscv/mm/init.c                          |   2 +-
 arch/riscv/mm/tlbflush.c                      | 215 ++++++++++++++++++
 13 files changed, 417 insertions(+), 161 deletions(-)
 create mode 100644 arch/riscv/mm/context.c
 create mode 100644 arch/riscv/mm/tlbflush.c
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv