All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Andy Lutomirski <luto@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>, Uros Bizjak <ubizjak@gmail.com>,
	x86@kernel.org
Subject: Re: [tip: x86/fpu] x86/fpu: Improve crypto performance by making kernel-mode FPU reliably usable in softirqs
Date: Thu, 6 Mar 2025 09:54:22 -0800	[thread overview]
Message-ID: <20250306175422.GH1796@sol.localdomain> (raw)
In-Reply-To: <174126241675.14745.2521678635311279694.tip-bot2@tip-bot2>

On Thu, Mar 06, 2025 at 12:00:16PM -0000, tip-bot2 for Eric Biggers wrote:
> Performance results:
> ====================
> 
> I did some benchmarks with AES-XTS encryption of 16-byte messages (which is
> unrealistically small, but this makes it easier to see the overhead of
> kernel-mode FPU...).  The baseline was 384 MB/s.  Removing the use of
> crypto/simd.c, which this work makes possible, increases it to 487 MB/s,
> a +27% improvement in throughput.
> 
> CPU was AMD Ryzen 9 9950X (Zen 5).  No debugging options were enabled.
> 
> [ mingo: Prettified the changelog and added performance results. ]
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Uros Bizjak <ubizjak@gmail.com>
> Link: https://lore.kernel.org/r/20250304204954.3901-1-ebiggers@kernel.org

Thanks!  To clarify, the removal of the use of crypto/simd.c from
arch/x86/crypto/, which is what gives the measured performance improvement,
happens in a separate patch
https://lore.kernel.org/r/20250220051325.340691-3-ebiggers@kernel.org/ which
depends on this one.  I'll try to get applied to the crypto tree in 6.16
(probably split into multiple patches).

As I've mentioned, there can also be a much larger performance improvement in
certain cases where the slow fallback path was being taken, or when users were
requesting a synchronous algorithm and therefore couldn't use the AES-NI code.

- Eric

      reply	other threads:[~2025-03-06 17:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 20:49 [RFC PATCH v2] x86/fpu: make kernel-mode FPU reliably usable in softirqs Eric Biggers
2025-03-05  9:07 ` Ingo Molnar
2025-03-05 16:55   ` Dave Hansen
2025-03-05 17:37     ` Ingo Molnar
2025-03-05 18:04       ` Dave Hansen
2025-03-05 18:13         ` Ingo Molnar
2025-03-05 21:22       ` David Laight
2025-03-05 17:39   ` Eric Biggers
2025-03-05 18:09     ` Ingo Molnar
2025-03-05 20:30       ` Eric Biggers
2025-03-06 11:42         ` Ingo Molnar
2025-03-06 12:09   ` Peter Zijlstra
2025-03-06 12:00 ` [tip: x86/fpu] x86/fpu: Improve crypto performance by making " tip-bot2 for Eric Biggers
2025-03-06 17:54   ` Eric Biggers [this message]

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=20250306175422.GH1796@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ubizjak@gmail.com \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.