Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: [PATCH] MIPS: Keep TLB cache hot while flushing
Date: Fri, 28 Oct 2011 09:16:29 -0700	[thread overview]
Message-ID: <4EAAD55D.4070106@gmail.com> (raw)
In-Reply-To: <CAJd=RBAQpea=wr2Nv6U1yRAH1bwaCvMxpnjfnKdhzAN3mtbK7A@mail.gmail.com>

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@gmail.com>

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

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

  reply	other threads:[~2011-10-28 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 14:15 [PATCH] MIPS: Keep TLB cache hot while flushing Hillf Danton
2011-10-28 16:16 ` David Daney [this message]
2011-11-04 14:56   ` Ralf Baechle
2011-11-06  5:08     ` Hillf Danton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAAD55D.4070106@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=dhillf@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox