Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Martin Willi <martin@strongswan.org>
Cc: linux-crypto@vger.kernel.org,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Antonio Quartulli <antonio@mandelbit.com>
Subject: Re: [PATCH v2 0/3] lib/crypto: x86/chacha: Add a 16-block AVX-512 function
Date: Tue, 3 Nov 2026 15:08:29 -0800	[thread overview]
Message-ID: <20261103230829.GD2281@quark> (raw)
In-Reply-To: <20261102113926.2765176-1-martin@strongswan.org>

On Mon, Nov 02, 2026 at 12:39:23PM +0100, Martin Willi wrote:
> I don't have a Zen 4, which splits zmm instructions into two 256-bit
> halves, so I can't tell how the 16-block function performs there.
> If anybody has access to one, numbers from there would be great.

chacha_kunit benchmark results from AMD Genoa (Zen 4 server processor):

(I added some extra lengths as well:)

     | Len   | Before    | After     | Improvement |
     +-------+-----------+-----------+-------------+
     | 1     | 6 MB/s    | 6 MB/s    |   0.00%     |
     | 16    | 106 MB/s  | 106 MB/s  |   0.00%     |
     | 64    | 437 MB/s  | 437 MB/s  |   0.00%     |
     | 127   | 1078 MB/s | 1072 MB/s |  -0.56%     |
     | 128   | 1106 MB/s | 1101 MB/s |  -0.45%     |
     | 200   | 1361 MB/s | 1316 MB/s |  -3.31%     |
     | 256   | 1674 MB/s | 1612 MB/s |  -3.70%     |
     | 511   | 2950 MB/s | 2970 MB/s |  +0.68%     |
     | 512   | 3052 MB/s | 2976 MB/s |  -2.49%     |
     | 768   | 2674 MB/s | 3417 MB/s | +27.79%     |
     | 1024  | 3241 MB/s | 4514 MB/s | +39.28%     |
     | 1420  | 3242 MB/s | 3845 MB/s | +18.60%     |
     | 2048  | 3587 MB/s | 4829 MB/s | +34.63%     |
     | 3173  | 3088 MB/s | 4439 MB/s | +43.75%     |
     | 4096  | 3743 MB/s | 5040 MB/s | +34.65%     |
     | 8920  | 3606 MB/s | 4846 MB/s | +34.39%     |
     | 16384 | 3739 MB/s | 5105 MB/s | +36.53%     |

Note that mobile Zen 5 processors have only 256-bit ALUs as well.  There
the results are similar.

It's still worth enabling AVX-512 code like this on these processors.
It's just not quite as helpful as it is on processors with 512-bit ALUs.

- Eric

  parent reply	other threads:[~2026-11-03 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 11:39 [PATCH v2 0/3] lib/crypto: x86/chacha: Add a 16-block AVX-512 function Martin Willi
2026-11-02 11:39 ` [PATCH v2 1/3] lib/crypto: x86/chacha: Rename the AVX-512VL assembly file Martin Willi
2026-11-02 11:39 ` [PATCH v2 2/3] lib/crypto: x86/chacha: Wrap the 8-block AVX-512 code in a macro Martin Willi
2026-11-02 11:39 ` [PATCH v2 3/3] lib/crypto: x86/chacha: Add a 16-block AVX-512 function Martin Willi
2026-11-03 13:49 ` [PATCH v2 0/3] " Antonio Quartulli
2026-11-03 23:08 ` Eric Biggers [this message]
2026-11-03 23:31 ` Eric Biggers

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=20261103230829.GD2281@quark \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=antonio@mandelbit.com \
    --cc=ardb@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=martin@strongswan.org \
    /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