powerpc/64s/radix: tlb do not flush on page size when fullmm
Subsystems (2)
Nicholas Piggin
maintainerPATCH 1/1 powerpc/64s/radix: tlb do not flush on page size when fullmm
When the mm is being torn down there will be a full PID flush so there is no need to flush the TLB on page size changes.
Signed-off-by Nicholas Piggin <[email protected]>
--- arch/powerpc/include/asm/tlb.h | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/include/asm/tlb.h +3 -0
@@ -84,6 +84,9 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,static inline void tlb_remove_check_page_size_change (struct mmu_gather *tlb,unsigned int page_size) { +if (tlb->fullmm) +return ; +if (!tlb->page_size) tlb->page_size = page_size;else if (tlb->page_size != page_size) {
Signature · 1 line
2.17.0
Quoted 2 lines · Nicholas Piggin
When the mm is being torn down there will be a full PID flush so there is no need to flush the TLB on page size changes.
and that tlb flush is PID flush since tlb->fulmm is set? So this avoids multiple PID tlb flush.
Reviewed-by Aneesh Kumar K.V <[email protected]>
Quoted 22 lines
Signed-off-by Nicholas Piggin <[email protected]>--- arch/powerpc/include/asm/tlb.h | 3 +++ 1 file changed, 3 insertions(+)arch/powerpc/include/asm/tlb.h +3
-0@@ -84,6 +84,9 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,static inline void tlb_remove_check_page_size_change (struct mmu_gather *tlb,unsigned int page_size) { +if (tlb->fullmm) +return ; +if (!tlb->page_size) tlb->page_size = page_size;else if (tlb->page_size != page_size) {Signature · 1 line
2.17.0
Michael Ellerman
AppliedQuoted 5 lines · Nicholas Piggin
When the mm is being torn down there will be a full PID flush so there is no need to flush the TLB on page size changes.
Signed-off-by Nicholas Piggin <[email protected]>Reviewed-by Aneesh Kumar K.V <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5a6099346c41792f1ba23aea6f74ad
cheers