public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Mao Bibo <maobibo@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: smp: optimization for flush_tlb_mm when exiting
Date: Thu, 12 May 2022 18:11:27 +0200	[thread overview]
Message-ID: <20220512161127.GF14475@alpha.franken.de> (raw)
In-Reply-To: <20220510114441.2959886-1-maobibo@loongson.cn>

On Tue, May 10, 2022 at 07:44:41PM +0800, Mao Bibo wrote:
> When process exits or execute new binary, it will call function
> exit_mmap with old mm, there is such function call trace:
>   exit_mmap(struct mm_struct *mm)
>       --> tlb_finish_mmu(&tlb, 0, -1)
>          --> arch_tlb_finish_mmu(tlb, start, end, force)
> 	    --> tlb_flush_mmu(tlb);
>                --> tlb_flush(struct mmu_gather *tlb)
>                   --> flush_tlb_mm(tlb->mm)
> 
> It is not necessary to flush tlb since oldmm is not used anymore
> by the process, there is similar operations on IA64/ARM64 etc,
> this patch adds such optimization on MIPS.
> 
> Signed-off-by: Mao Bibo <maobibo@loongson.cn>
> ---
>  arch/mips/kernel/smp.c | 6 ++++++
>  1 file changed, 6 insertions(+)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2022-05-12 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 11:44 [PATCH] MIPS: smp: optimization for flush_tlb_mm when exiting Mao Bibo
2022-05-12 16:11 ` Thomas Bogendoerfer [this message]

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=20220512161127.GF14475@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=maobibo@loongson.cn \
    /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