linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dirk Müller" <dmueller@suse.de>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] Use strict priority ranking for pq gen() benchmarking
Date: Fri, 31 Dec 2021 09:52:53 +0100	[thread overview]
Message-ID: <5d98e14e6fbc4de157e16ca401d1a562@suse.de> (raw)
In-Reply-To: <0c95af18-2924-573c-9473-6645f8fc93bd@molgen.mpg.de>

Am 2021-12-30 14:46, schrieb Paul Menzel:

Hi Paul,

> Can the AVX2 wins over AVX512 be explained, or does it point to some
> implementation problem?

I've not yet analyzed this deep enough to have a defendable explanation 
ready, sorry. My patch is
not changing the situation in regards to AVX512 vs AVX2 (both are ranked 
equal, same like before).
The only change I do is that SSE2 is ranked lower than AVX2, so cpu 
generations that have AVX2 will
stop benchmarking at AVX2 rather than also including SSE2 benchmark 
runs.

The current benchmark routine is likely too naive when you look at the 
last 20+ years of
cpu design improvements (prefetching, Out-of-Order Execution, Turbo 
modes, Energy-Cores,
AVX512 licensing turbo and many other aspects). This is not in my 
current focus, my current
focus is on lowering the tax of the benchmark.

> By the way, Borislav did not give much credit to the benchmarks results 
> [1].

I have seen that as well, there are two remarks on this (both not 
invalidating what Borislav wrote):

* the comment was about xor(), this patch is about gen()
* the benchmark logic does a relative ranking of approaches, so the 
absolute number fluctuation doesn't matter if they still rank the same.

>> By giving AVXx variants higher priority over SSE, we can generally
>> skip 3 benchmarks which speeds this up by 33% - 50%, depending on
>> whether AVX512 is available.
> Please give concrete timing numbers for one system you tested this on.

I have given an explanation of how this patch affects number of 
benchmarks that are run. how long they take depends on other factors. 
this is the list of benchmarks configured (lib/raid6/algos.c the 
raid6_algos6[] array):


   #if defined(__x86_64__) && !defined(__arch_um__)
   #ifdef CONFIG_AS_AVX512
           &raid6_avx512x4,
           &raid6_avx512x2,
           &raid6_avx512x1,
   #endif
           &raid6_avx2x4,
           &raid6_avx2x2,
           &raid6_avx2x1,
           &raid6_sse2x4,
           &raid6_sse2x2,
           &raid6_sse2x1,
   #endif

without this patch, all 9 are executed. with this patch, the last 3 
(sse2x*) are skipped, leading to a 3 out of 6 or 3 out of 9 (depending 
on whether or not AVX512 is enabled) improvement, or 33%-50% as written 
above.

I'm open to any sugggestion of a wording change that makes this clearer.


Thanks,
Dirk

  reply	other threads:[~2021-12-31  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 22:36 [PATCH] Use strict priority ranking for pq gen() benchmarking Dirk Müller
2021-12-30 13:46 ` Paul Menzel
2021-12-31  8:52   ` Dirk Müller [this message]
2021-12-31  8:57     ` Paul Menzel
2022-01-02  0:03 ` Song Liu
2022-01-03 16:28   ` Dirk Müller
2022-01-04 17:28     ` Song Liu
2022-01-05 16:39       ` Dirk Müller

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=5d98e14e6fbc4de157e16ca401d1a562@suse.de \
    --to=dmueller@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    /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;
as well as URLs for NNTP newsgroup(s).