Re: [PATCH] Skip benchmarking of non-best xor_syndrome functions

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

 



On Wed, Dec 29, 2021 at 2:34 PM Dirk Müller <dmueller@xxxxxxx> wrote:
>
> In commit fe5cbc6e06c7 ("md/raid6 algorithms: delta syndrome functions")
> a xor_syndrome() has been added for optimized syndrome calculation and
> being added also to to the raid6_choose_gen() function. However, the
> result of the xor_syndrome() benchmarking was intentionally discarded
> and did not influence the choice.
>
> We can optimize raid6_choose_gen() without changing its behavior by
> only benchmarking the chosen xor_syndrome() variant and printing it
> output, rather than benchmarking also the ones that are discarded and
> never influence the outcome.
>
> For x86_64, this removes 8 out of 18 benchmark loops which each take
> 16 jiffies, so up to 160 jiffies saved on module load (640ms on a 250HZ
> kernel).

How critical is 160 (or 128?) jiffies saving here? I think some users use these
information from dmesg, which shows an overview of all these algorithms:

[   21.629694] raid6: avx2x4   gen() 18081 MB/s
[   21.799692] raid6: avx2x4   xor()  8568 MB/s
[   21.969692] raid6: avx2x2   gen() 15060 MB/s
[   22.139792] raid6: avx2x2   xor()  9665 MB/s
[   22.309718] raid6: avx2x1   gen()  9223 MB/s
[   22.479691] raid6: avx2x1   xor()  6809 MB/s
[   22.649691] raid6: sse2x4   gen()  9647 MB/s
[   22.819691] raid6: sse2x4   xor()  6229 MB/s
[   22.989690] raid6: sse2x2   gen()  7276 MB/s
[   23.159690] raid6: sse2x2   xor()  5400 MB/s
[   23.329761] raid6: sse2x1   gen()  4734 MB/s
[   23.499693] raid6: sse2x1   xor()  3565 MB/s
[   23.500225] raid6: using algorithm avx2x4 gen() 18081 MB/s
[   23.500886] raid6: .... xor() 8568 MB/s, rmw enabled

If it is critical for some use cases, maybe we can gate the change with a
CONFIG?

Thanks,
Song



[...]




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux