Files
linux/lib/raid/Kconfig
Christoph Hellwig 10dab13117 raid6/kunit: add a benchmark
Add a benchmark to test the RAID 6 P/Q functions for more representative
block sizes and numbers of disks.  This splits the maximum alloc size used
for the benchmark from the max size for the kunit test because recovery is
currently limited to a single page at a time.  Hopefully this will be
fixed soon.

The runtime numbers are reported in GB/s as the numbers of modern
implementations are basically unreadable as MB/s.  This means
retro-architectures could report 0, but that is an easy tradeoff.

Link: https://lore.kernel.org/20260715144825.95432-9-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-03 21:10:16 -07:00

76 lines
1.8 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0
config XOR_BLOCKS
tristate
# selected by architectures that provide an optimized XOR implementation
config XOR_BLOCKS_ARCH
depends on XOR_BLOCKS
default y if ALPHA
default y if ARM
default y if ARM64
default y if CPU_HAS_LSX # loongarch
default y if ALTIVEC # powerpc
default y if RISCV_ISA_V
default y if SPARC
default y if S390
default y if X86_32
default y if X86_64
bool
config XOR_KUNIT_TEST
tristate "KUnit tests for xor_gen" if !KUNIT_ALL_TESTS
depends on KUNIT
depends on XOR_BLOCKS
default KUNIT_ALL_TESTS
help
Unit tests for the XOR library functions.
This is intended to help people writing architecture-specific
optimized versions. If unsure, say N.
config XOR_BENCHMARK
bool "Benchmark for xor_gen"
depends on XOR_KUNIT_TEST
help
Include benchmarks in the KUnit test suite for xor_gen.
config RAID6_PQ
tristate
# selected by architectures that provide an optimized PQ implementation
config RAID6_PQ_ARCH
depends on RAID6_PQ
default y if KERNEL_MODE_NEON # arm32/arm64
default y if LOONGARCH
default y if ALTIVEC # powerpc
default y if RISCV_ISA_V
default y if S390
default y if X86
bool
config RAID6_PQ_KUNIT_TEST
tristate "KUnit tests for RAID6 PQ functions" if !KUNIT_ALL_TESTS
depends on KUNIT
depends on RAID6_PQ
default KUNIT_ALL_TESTS
help
Unit tests for the RAID6 PQ library functions.
This is intended to help people writing architecture-specific
optimized versions. If unsure, say N.
config RAID6_PQ_KUNIT_BENCHMARK
bool "Benchmark for RAID6 PQ"
depends on RAID6_PQ_KUNIT_TEST
help
Include benchmarks in the KUnit test suite for raid P/Q generation.
config RAID6_PQ_BENCHMARK
bool "Automatically choose fastest RAID6 PQ functions"
depends on RAID6_PQ
default y
help
Benchmark all available RAID6 PQ functions on init and choose the
fastest one.