sparc: Allow nesting of lazy MMU mode]
PATCH 2/2 sparc: Allow nesting of lazy MMU mode]
Oops, wrong email address.
----- Forwarded message from "Matthew Wilcox (Oracle)" <[email protected]> -----
Date: Thu, 12 Oct 2023 20:54:15 +0100
From: "Matthew Wilcox (Oracle)" <[email protected]>
To: [email protected]
Cc: "Matthew Wilcox (Oracle)" <[email protected]>,
[email protected], [email protected], Michael Ellerman <[email protected]>, Erhard Furtner <[email protected]>, David Woodhouse <[email protected]>, Juergen Gross <[email protected]>
Subject: [PATCH 2/2] sparc: Allow nesting of lazy MMU mode
X-Mailer: git-send-email 2.37.1
As noted in commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode"), we can now nest calls to arch_enter_lazy_mmu_mode(). Use ->active as a counter instead of a flag and only drain the batch when the counter hits 0.
--- arch/sparc/mm/tlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/sparc/mm/tlb.c +2 -3
@@ -54,16 +54,15 @@ void arch_enter_lazy_mmu_mode(void) {struct tlb_batch *tb =this_cpu_ptr (&tlb_batch); - tb->active =1 ; + tb->active++; }void arch_leave_lazy_mmu_mode (void ) {struct tlb_batch *tb =this_cpu_ptr (&tlb_batch); -if (tb->tlb_nr) +if ((--tb->active ==0 ) && tb->tlb_nr)flush_tlb_pending (); - tb->active =0 ; } static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr,
Signature · 4 lines
2.40.1 ----- End forwarded message -----