From: Conor Dooley <conor@kernel.org>
To: Atish Patra <atishp@rivosinc.com>
Cc: linux-kernel@vger.kernel.org, Albert Ou <aou@eecs.berkeley.edu>,
Atish Patra <atishp@atishpatra.org>,
Anup Patel <anup@brainfault.org>,
Damien Le Moal <damien.lemoal@wdc.com>,
devicetree@vger.kernel.org, Jisheng Zhang <jszhang@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH] RISC-V: Do not issue remote fences until smp is available
Date: Mon, 31 Oct 2022 19:11:56 +0000 [thread overview]
Message-ID: <Y2Ad/FaLE5qM01gR@spud> (raw)
In-Reply-To: <20221028231929.347918-1-atishp@rivosinc.com>
On Fri, Oct 28, 2022 at 04:19:29PM -0700, Atish Patra wrote:
> It is useless to issue remote fences if there is a single core
> available. It becomes a bottleneck for sbi based rfences where
> we will be making those ECALLs for no reason. Early code patching
> because of static calls end up in this path.
>
> Signed-off-by: Atish Patra <atishp@rivosinc.com>
Hey Atish,
This doesn't apply for me to either fixes or for-next. What branch does
it apply to?
Thanks,
Conor.
> ---
> arch/riscv/mm/cacheflush.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c
> index f10cb47eac3a..7fafc8c26505 100644
> --- a/arch/riscv/mm/cacheflush.c
> +++ b/arch/riscv/mm/cacheflush.c
> @@ -19,6 +19,10 @@ void flush_icache_all(void)
> {
> local_flush_icache_all();
>
> + /* No need to issue remote fence if only 1 cpu is online */
> + if (num_online_cpus() == 1)
> + return;
> +
> if (IS_ENABLED(CONFIG_RISCV_SBI) && !riscv_use_ipi_for_rfence())
> sbi_remote_fence_i(NULL);
> else
> --
> 2.34.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <conor@kernel.org>
To: Atish Patra <atishp@rivosinc.com>
Cc: linux-kernel@vger.kernel.org, Albert Ou <aou@eecs.berkeley.edu>,
Atish Patra <atishp@atishpatra.org>,
Anup Patel <anup@brainfault.org>,
Damien Le Moal <damien.lemoal@wdc.com>,
devicetree@vger.kernel.org, Jisheng Zhang <jszhang@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH] RISC-V: Do not issue remote fences until smp is available
Date: Mon, 31 Oct 2022 19:11:56 +0000 [thread overview]
Message-ID: <Y2Ad/FaLE5qM01gR@spud> (raw)
In-Reply-To: <20221028231929.347918-1-atishp@rivosinc.com>
On Fri, Oct 28, 2022 at 04:19:29PM -0700, Atish Patra wrote:
> It is useless to issue remote fences if there is a single core
> available. It becomes a bottleneck for sbi based rfences where
> we will be making those ECALLs for no reason. Early code patching
> because of static calls end up in this path.
>
> Signed-off-by: Atish Patra <atishp@rivosinc.com>
Hey Atish,
This doesn't apply for me to either fixes or for-next. What branch does
it apply to?
Thanks,
Conor.
> ---
> arch/riscv/mm/cacheflush.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c
> index f10cb47eac3a..7fafc8c26505 100644
> --- a/arch/riscv/mm/cacheflush.c
> +++ b/arch/riscv/mm/cacheflush.c
> @@ -19,6 +19,10 @@ void flush_icache_all(void)
> {
> local_flush_icache_all();
>
> + /* No need to issue remote fence if only 1 cpu is online */
> + if (num_online_cpus() == 1)
> + return;
> +
> if (IS_ENABLED(CONFIG_RISCV_SBI) && !riscv_use_ipi_for_rfence())
> sbi_remote_fence_i(NULL);
> else
> --
> 2.34.1
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-10-31 19:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 23:19 [PATCH] RISC-V: Do not issue remote fences until smp is available Atish Patra
2022-10-28 23:19 ` Atish Patra
2022-10-31 19:11 ` Conor Dooley [this message]
2022-10-31 19:11 ` Conor Dooley
2022-10-31 19:26 ` Atish Patra
2022-10-31 19:26 ` Atish Patra
2022-11-10 21:42 ` Palmer Dabbelt
2022-11-10 21:42 ` Palmer Dabbelt
2022-11-12 7:46 ` Atish Patra
2022-11-12 7:46 ` 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=Y2Ad/FaLE5qM01gR@spud \
--to=conor@kernel.org \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@atishpatra.org \
--cc=atishp@rivosinc.com \
--cc=damien.lemoal@wdc.com \
--cc=devicetree@vger.kernel.org \
--cc=jszhang@kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.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.