linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] riscv: tlb flush improvements
@ 2023-07-27 18:55 Alexandre Ghiti
  2023-07-27 18:55 ` [PATCH v2 1/4] riscv: Improve flush_tlb() Alexandre Ghiti
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Alexandre Ghiti @ 2023-07-27 18:55 UTC (permalink / raw)
  To: Will Deacon, Aneesh Kumar K . V, Andrew Morton, Nick Piggin,
	Peter Zijlstra, Mayuresh Chitale, Vincent Chen, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, linux-arch, linux-mm, linux-riscv,
	linux-kernel
  Cc: Alexandre Ghiti

This series optimizes the tlb flushes on riscv which used to simply
flush the whole tlb whatever the size of the range to flush or the size
of the stride.

Patch 3 introduces a threshold that is microarchitecture specific and
will very likely be modified by vendors, not sure though which mechanism
we'll use to do that (dt? alternatives? vendor initialization code?).

Next steps would be to implement:
- svinval extension as Mayuresh did here [1]
- BATCHED_UNMAP_TLB_FLUSH (I'll wait for arm64 patchset to land)
- MMU_GATHER_RCU_TABLE_FREE
- MMU_GATHER_MERGE_VMAS

Any other idea welcome.

[1] https://lore.kernel.org/linux-riscv/20230623123849.1425805-1-mchitale@ventanamicro.com/

Changes in v2:
- Make static tlb_flush_all_threshold, we'll figure out later how to
  override this value on a vendor basis, as suggested by Conor and Palmer
- Fix nommu build, as reported by Conor

Alexandre Ghiti (4):
  riscv: Improve flush_tlb()
  riscv: Improve flush_tlb_range() for hugetlb pages
  riscv: Make __flush_tlb_range() loop over pte instead of flushing the
    whole tlb
  riscv: Improve flush_tlb_kernel_range()

 arch/riscv/include/asm/tlb.h      |  8 ++-
 arch/riscv/include/asm/tlbflush.h | 12 ++--
 arch/riscv/mm/tlbflush.c          | 93 +++++++++++++++++++++++++++----
 3 files changed, 96 insertions(+), 17 deletions(-)

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-07-28 13:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 18:55 [PATCH v2 0/4] riscv: tlb flush improvements Alexandre Ghiti
2023-07-27 18:55 ` [PATCH v2 1/4] riscv: Improve flush_tlb() Alexandre Ghiti
2023-07-28 13:35   ` Andrew Jones
2023-07-27 18:55 ` [PATCH v2 2/4] riscv: Improve flush_tlb_range() for hugetlb pages Alexandre Ghiti
2023-07-28 13:40   ` Andrew Jones
2023-07-27 18:55 ` [PATCH v2 3/4] riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb Alexandre Ghiti
2023-07-28 13:32   ` Andrew Jones
2023-07-28 13:51     ` Conor Dooley
2023-07-28 13:50   ` Conor Dooley
2023-07-27 18:55 ` [PATCH v2 4/4] riscv: Improve flush_tlb_kernel_range() Alexandre Ghiti
2023-07-28 13:48   ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).