Re: [PATCH v3] riscv: Optimize crct10dif with zbc extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 06, 2025 at 12:19:50PM -0800, Eric Biggers wrote:
> On Wed, Feb 05, 2025 at 08:30:12AM -0800, Eric Biggers wrote:
> > On Wed, Feb 05, 2025 at 02:58:15PM +0800, Zhihang Shao wrote:
> > > The current CRC-T10DIF algorithm on RISC-V platform is based on
> > > table-lookup optimization.
> > > Given the previous work on optimizing crc32 calculations with zbc
> > > extension, it is believed that this will be equally effective for
> > > accelerating crc-t10dif.
> > > 
> > > Therefore this patch offers an implementation of crc-t10dif using zbc
> > > extension. This can detect whether the current runtime environment
> > > supports zbc feature and, if so, uses it to accelerate crc-t10dif
> > > calculations.
> > > 
> > > This patch is updated due to the patchset of updating kernel's
> > > CRC-T10DIF library in 6.14, which is finished by Eric Biggers.
> > > Also, I used crc_kunit.c to test the performance of crc-t10dif optimized
> > > by crc extension.
> > > 
> > > Signed-off-by: Zhihang Shao <zhihang.shao.iscas@xxxxxxxxx>
> > > ---
> > >  arch/riscv/Kconfig                |   1 +
> > >  arch/riscv/lib/Makefile           |   1 +
> > >  arch/riscv/lib/crc-t10dif-riscv.c | 132 ++++++++++++++++++++++++++++++
> > >  3 files changed, 134 insertions(+)
> > >  create mode 100644 arch/riscv/lib/crc-t10dif-riscv.c
> > 
> > Acked-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> > Tested-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> > 
> > This can go through the riscv tree.
> > 
> 
> Actually, if people don't mind I'd like to take this through the crc tree.  Due
> to https://lore.kernel.org/r/20250206173857.39794-1-ebiggers@xxxxxxxxxx the
> function crc_t10dif_is_optimized() becomes unused and we should remove it, which
> would conflict with this patch which adds another implementation of it.
> 

FYI, I've removed crc_t10dif_is_optimized() in the crc-next tree via
https://lore.kernel.org/r/20250208175647.12333-1-ebiggers@xxxxxxxxxx

If you can rebase your patch again and address my comments, I'd be glad to apply
it to the crc tree for 6.15.  Thanks!

- Eric




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux