From: Christoph Hellwig <hch@lst.de>
To: Atish Patra <atish.patra@wdc.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Palmer Dabbelt <palmer@sifive.com>,
linux-kernel@vger.kernel.org, Anup Patel <Anup.Patel@wdc.com>,
Andreas Schwab <schwab@linux-m68k.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-riscv@lists.infradead.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v3 3/3] RISC-V: Do not invoke SBI call if cpumask is empty
Date: Thu, 22 Aug 2019 03:51:13 +0200 [thread overview]
Message-ID: <20190822015113.GC11922@lst.de> (raw)
In-Reply-To: <20190822004644.25829-4-atish.patra@wdc.com>
On Wed, Aug 21, 2019 at 05:46:44PM -0700, Atish Patra wrote:
> SBI calls are expensive. If cpumask is empty, there is no need to
> trap via SBI as no remote tlb flushing is required.
>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
> arch/riscv/mm/tlbflush.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
> index 9f58b3790baa..2bd3c418d769 100644
> --- a/arch/riscv/mm/tlbflush.c
> +++ b/arch/riscv/mm/tlbflush.c
> @@ -21,6 +21,9 @@ static void __sbi_tlb_flush_range(struct cpumask *cmask, unsigned long start,
> goto issue_sfence;
> }
>
> + if (cpumask_empty(cmask))
> + goto done;
I think this can even be done before the get_cpu to optimize it a little
further.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Atish Patra <atish.patra@wdc.com>
Cc: linux-kernel@vger.kernel.org, Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@sifive.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Christoph Hellwig <hch@lst.de>, Anup Patel <Anup.Patel@wdc.com>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH v3 3/3] RISC-V: Do not invoke SBI call if cpumask is empty
Date: Thu, 22 Aug 2019 03:51:13 +0200 [thread overview]
Message-ID: <20190822015113.GC11922@lst.de> (raw)
In-Reply-To: <20190822004644.25829-4-atish.patra@wdc.com>
On Wed, Aug 21, 2019 at 05:46:44PM -0700, Atish Patra wrote:
> SBI calls are expensive. If cpumask is empty, there is no need to
> trap via SBI as no remote tlb flushing is required.
>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
> arch/riscv/mm/tlbflush.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
> index 9f58b3790baa..2bd3c418d769 100644
> --- a/arch/riscv/mm/tlbflush.c
> +++ b/arch/riscv/mm/tlbflush.c
> @@ -21,6 +21,9 @@ static void __sbi_tlb_flush_range(struct cpumask *cmask, unsigned long start,
> goto issue_sfence;
> }
>
> + if (cpumask_empty(cmask))
> + goto done;
I think this can even be done before the get_cpu to optimize it a little
further.
next prev parent reply other threads:[~2019-08-22 1:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 0:46 [PATCH v3 0/3] Optimize tlbflush path Atish Patra
2019-08-22 0:46 ` Atish Patra
2019-08-22 0:46 ` [PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible Atish Patra
2019-08-22 0:46 ` Atish Patra
2019-08-22 1:46 ` Christoph Hellwig
2019-08-22 1:46 ` Christoph Hellwig
2019-08-22 4:01 ` Atish Patra
2019-08-22 4:01 ` Atish Patra
2019-08-22 4:27 ` hch
2019-08-22 4:27 ` hch
2019-08-22 5:39 ` Atish Patra
2019-08-22 5:39 ` Atish Patra
2019-08-22 0:46 ` [PATCH v3 2/3] RISC-V: Issue a tlb page flush " Atish Patra
2019-08-22 0:46 ` Atish Patra
2019-08-22 1:50 ` Christoph Hellwig
2019-08-22 1:50 ` Christoph Hellwig
2019-08-22 4:02 ` Atish Patra
2019-08-22 4:02 ` Atish Patra
2019-08-22 0:46 ` [PATCH v3 3/3] RISC-V: Do not invoke SBI call if cpumask is empty Atish Patra
2019-08-22 0:46 ` Atish Patra
2019-08-22 1:51 ` Christoph Hellwig [this message]
2019-08-22 1:51 ` Christoph Hellwig
2019-08-22 4:23 ` Atish Patra
2019-08-22 4:23 ` Atish Patra
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=20190822015113.GC11922@lst.de \
--to=hch@lst.de \
--cc=Anup.Patel@wdc.com \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@wdc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@sifive.com \
--cc=paul.walmsley@sifive.com \
--cc=schwab@linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.