From: Conor Dooley <conor.dooley@microchip.com>
To: Evan Green <evan@rivosinc.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>, <slewis@rivosinc.com>,
<heiko@sntech.de>, Conor Dooley <conor@kernel.org>,
<vineetg@rivosinc.com>, Heiko Stuebner <heiko.stuebner@vrull.eu>,
Albert Ou <aou@eecs.berkeley.edu>,
Andrew Bresticker <abrestic@rivosinc.com>,
Andrew Jones <ajones@ventanamicro.com>,
Atish Patra <atishp@rivosinc.com>,
Celeste Liu <coelacanthus@outlook.com>,
Guo Ren <guoren@kernel.org>, Jisheng Zhang <jszhang@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Ley Foon Tan <leyfoon.tan@starfivetech.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Samuel Holland <samuel@sholland.org>,
Sunil V L <sunilvl@ventanamicro.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH v6 4/6] RISC-V: hwprobe: Support probing of misaligned access performance
Date: Tue, 11 Apr 2023 15:06:49 +0100 [thread overview]
Message-ID: <20230411-prefix-rename-71ab4af0324a@wendy> (raw)
In-Reply-To: <20230407231103.2622178-5-evan@rivosinc.com>
[-- Attachment #1: Type: text/plain, Size: 1715 bytes --]
On Fri, Apr 07, 2023 at 04:11:01PM -0700, Evan Green wrote:
> This allows userspace to select various routines to use based on the
> performance of misaligned access on the target hardware.
>
> Rather than adding DT bindings, this change taps into the alternatives
> mechanism used to probe CPU errata. Add a new function pointer alongside
> the vendor-specific errata_patch_func() that probes for desirable errata
> (otherwise known as "features"). Unlike the errata_patch_func(), this
> function is called on each CPU as it comes up, so it can save
> feature information per-CPU.
>
> The T-head C906 has fast unaligned access, both as defined by GCC [1],
> and in performing a basic benchmark, which determined that byte copies
> are >50% slower than a misaligned word copy of the same data size (source
> for this test at [2]):
>
> bytecopy size f000 count 50000 offset 0 took 31664899 us
> wordcopy size f000 count 50000 offset 0 took 5180919 us
> wordcopy size f000 count 50000 offset 1 took 13416949 us
>
> [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.cc#L353
> [2] https://pastebin.com/EPXvDHSW
>
> Co-developed-by: Palmer Dabbelt <palmer@rivosinc.com>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> Signed-off-by: Evan Green <evan@rivosinc.com>
> Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
> Tested-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
I think I had given you an R-b a few versions back, guess it was dropped
due to changes or w/e :)
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Perhaps at some point the "errata" naming of those files should change,
but today is not that day.
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-04-11 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 23:10 [PATCH v6 0/6] RISC-V Hardware Probing User Interface Evan Green
2023-04-07 23:10 ` [PATCH v6 2/6] RISC-V: Add a syscall for HW probing Evan Green
2023-04-07 23:11 ` [PATCH v6 3/6] RISC-V: hwprobe: Add support for RISCV_HWPROBE_BASE_BEHAVIOR_IMA Evan Green
2023-04-14 1:37 ` Paul Walmsley
2023-04-07 23:11 ` [PATCH v6 4/6] RISC-V: hwprobe: Support probing of misaligned access performance Evan Green
2023-04-11 14:06 ` Conor Dooley [this message]
2023-04-12 13:50 ` Paul Walmsley
2023-04-11 14:16 ` [PATCH v6 0/6] RISC-V Hardware Probing User Interface Conor Dooley
2023-04-20 17:36 ` Palmer Dabbelt
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=20230411-prefix-rename-71ab4af0324a@wendy \
--to=conor.dooley@microchip.com \
--cc=abrestic@rivosinc.com \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@rivosinc.com \
--cc=coelacanthus@outlook.com \
--cc=conor@kernel.org \
--cc=corbet@lwn.net \
--cc=evan@rivosinc.com \
--cc=guoren@kernel.org \
--cc=heiko.stuebner@vrull.eu \
--cc=heiko@sntech.de \
--cc=jszhang@kernel.org \
--cc=leyfoon.tan@starfivetech.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=paul.walmsley@sifive.com \
--cc=philipp.tomsich@vrull.eu \
--cc=samuel@sholland.org \
--cc=slewis@rivosinc.com \
--cc=sunilvl@ventanamicro.com \
--cc=vineetg@rivosinc.com \
/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