From: Eric Biggers <ebiggers@kernel.org>
To: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Cc: Simon Richter <Simon.Richter@hogyros.de>,
linux-fscrypt@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
ceph-devel@vger.kernel.org
Subject: Re: [PATCH] fscrypt: don't use hardware offload Crypto API drivers
Date: Thu, 12 Jun 2025 15:57:43 +0000 [thread overview]
Message-ID: <20250612155743.GA3529549@google.com> (raw)
In-Reply-To: <aEqU0iU1tBrLEYUq@gcabiddu-mobl.ger.corp.intel.com>
On Thu, Jun 12, 2025 at 09:50:26AM +0100, Giovanni Cabiddu wrote:
> On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote:
>
> ...
>
> > FWIW, here's what happens if you try to use the Intel QAT driver with dm-crypt:
> > https://lore.kernel.org/r/CACsaVZ+mt3CfdXV0_yJh7d50tRcGcRZ12j3n6-hoX2cz3+njsg@mail.gmail.com/
>
> /s/happens/happened/
>
> ... and it got fixed
> https://lore.kernel.org/all/20220506082327.21605-1-giovanni.cabiddu@intel.com/
But it reached users in the first place, including stable kernels. And
apparently the issues were going on for years and were known to the authors of
the driver
(https://lore.kernel.org/linux-crypto/91fe9f87-54d7-4140-4d1a-eac8e2081a7c@gmail.com/).
We simply don't have issues like this with the AES-NI or VAES XTS code.
And separately, QAT was reported to be much slower than AES-NI for synchronous use
(https://lore.kernel.org/linux-crypto/0171515-7267-624-5a22-238af829698f@redhat.com/)
Later, I added VAES accelerated AES-XTS code which is over twice as fast as
AES-NI on the latest Intel CPUs, so that likely widened the gap even more.
Yet, the QAT driver registers its "xts(aes)" implementation with priority 4001,
compared to priority 800 for the VAES accelerated one. So the QAT one is the
one that will be used by fscrypt!
That seems like a major issue even just from a performance perspective.
I expect this patch will significantly improve fscrypt performance on Intel
servers that have QAT.
- Eric
next prev parent reply other threads:[~2025-06-12 15:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 20:58 [PATCH] fscrypt: don't use hardware offload Crypto API drivers Eric Biggers
2025-06-12 0:21 ` Simon Richter
2025-06-12 0:59 ` Eric Biggers
2025-06-12 6:25 ` Eric Biggers
2025-06-12 8:50 ` Giovanni Cabiddu
2025-06-12 15:57 ` Eric Biggers [this message]
2025-06-13 1:23 ` Eric Biggers
2025-06-13 11:10 ` Giovanni Cabiddu
2025-06-25 6:32 ` Eric Biggers
2025-06-25 12:44 ` Theodore Ts'o
2025-06-25 18:38 ` Eric Biggers
2025-06-25 16:29 ` Maxime MERE
2025-06-25 19:17 ` Eric Biggers
2025-06-13 9:01 ` Maxime MERE
2025-06-13 14:42 ` Eric Biggers
2025-06-25 16:29 ` Maxime MERE
2025-06-25 18:57 ` Eric Biggers
2025-06-26 2:36 ` 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=20250612155743.GA3529549@google.com \
--to=ebiggers@kernel.org \
--cc=Simon.Richter@hogyros.de \
--cc=ceph-devel@vger.kernel.org \
--cc=giovanni.cabiddu@intel.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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