Re: [PATCH 2/2] xor/kunit: add a benchmark

Christoph Hellwig <[email protected]>
Newsgroups gmane.linux.raid,gmane.linux.kernel
Message-ID <[email protected]>
On Wed, Jun 17, 2026 at 05:14:48PM +0000, Eric Biggers wrote:
> The #ifdef can be avoided using kunit_skip(), as the crypto and CRC
> tests do:
> 
>     if (!IS_ENABLED(CONFIG_XOR_BENCHMARK))
>             kunit_skip(test, "not enabled");

I saw that, but what's the point or just not compiling it?

> > +		static_assert(ARRAY_SIZE(len_to_test) == 2);
> > +		kunit_info(test, "%3u disks:\t%5llu  GB/s\t%5llu  GB/s\n",
> > +				nr, speed[0], speed[1]);
> 
> As mentioned in the other thread, this measures the speed at which the
> source data is consumed, which differs from the code in
> lib/raid/xor/xor-core.c that measures the speed at which the destination
> data is produced.  Probably best to make them consistent.

The throughput for the generated parity isn't very interesting.  It is
the overall throughput that determines the performance.  And yes,
the selection benchmark is a complete mess - the single disk XOR is
not a relevant performance metric.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.