[Top] [All Lists]

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

To: Hillf Danton <>
Subject: Re: [PATCH] MIPS: Keep TLB cache hot while flushing
From: David Daney <>
Date: Fri, 28 Oct 2011 09:16:29 -0700
Cc: Ralf Baechle <>, "" <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=pmXz9W+BXPX4LrBFEGIXriOG+tENCAK9NiFLz2x4UB8=; b=asmYbEii+p7cXAqTXqyjZlqyygAYyQGFYzrQCl0Fo6g90F63tdc82Up8gz4lVtFat+ j7bXsy9DWqD7bCSCXX0I3alGspQoIoqyxdBP4/7ak+phEZUxooaK4Ch9rjn/bb+7IcH1 B9H9xprzvLA60k7rELev8LvrJq/eY1Oh11YFo=
In-reply-to: <>
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
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.


Signed-off-by: Hillf Danton<>

Acked-by: David Daney <>


--- 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)

<Prev in Thread] Current Thread [Next in Thread>