Re: [PATCH] MIPS: Keep TLB cache hot while flushing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/2011 07:15 AM, Hillf Danton wrote:
Hi David,

If we only flush the TLB of the given huge page, the TLB cache remains hot for
the relevant mm as it is, and less will be refilled after flush, huge or not.

As always all comments and ideas welcome.


I haven't tested it, but it looks correct. When I wrote the original flush_tlb_mm(), I was in a hurry and was more concerned about maintaining TLB consistency, rather than performance.

Thanks

Signed-off-by: Hillf Danton<dhillf@xxxxxxxxx>

Acked-by: David Daney <david.daney@xxxxxxxxxx>

---

--- a/arch/mips/include/asm/hugetlb.h	Sat May 14 15:21:01 2011
+++ b/arch/mips/include/asm/hugetlb.h	Fri Oct 28 22:08:05 2011
@@ -70,7 +70,7 @@ static inline pte_t huge_ptep_get_and_cl
  static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
  					 unsigned long addr, pte_t *ptep)
  {
-	flush_tlb_mm(vma->vm_mm);
+	flush_tlb_page(vma, addr&  huge_page_mask(hstate_vma(vma)));
  }

  static inline int huge_pte_none(pte_t pte)





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux