]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Hugetlb: Keep TLB cache hot while flushing
authorHillf Danton <dhillf@gmail.com>
Tue, 22 Nov 2011 14:38:02 +0000 (14:38 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 22 Nov 2011 14:38:02 +0000 (14:38 +0000)
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.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Cc: linux-mips@linux-mips.org
Acked-by: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/2860/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/hugetlb.h

index c565b7c3f0b5b071833c751e4edddfb61aba84f4..58d36889f09b3c7e6af95106d1d6fd22c19f4f0d 100644 (file)
@@ -70,7 +70,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
 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)