From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Steffen Klassert <steffen.klassert@secunet.com>,
netdev@vger.kernel.org, linux-crypto@vger.kernel.org,
fsverity@lists.linux.dev, dm-devel@lists.linux.dev,
x86@kernel.org, linux-arm-kernel@lists.infradead.org,
Sami Tolvanen <samitolvanen@google.com>,
Bart Van Assche <bvanassche@acm.org>,
Tim Chen <tim.c.chen@linux.intel.com>
Subject: Re: [PATCH v4 6/8] fsverity: improve performance by using multibuffer hashing
Date: Tue, 11 Jun 2024 13:32:09 -0700 [thread overview]
Message-ID: <20240611203209.GB128642@sol.localdomain> (raw)
In-Reply-To: <ZmhvnBsqKe7AakY-@gondor.apana.org.au>
On Tue, Jun 11, 2024 at 11:39:08PM +0800, Herbert Xu wrote:
> On Tue, Jun 11, 2024 at 11:21:43PM +0800, Herbert Xu wrote:
> >
> > Therefore if we switched to a linked-list API networking could
> > give us the buffers with minimal changes.
>
> BTW, this is not just about parallelising hashing. Just as one of
> the most significant benefits of GSO does not come from hardware
> offload, but rather the amortisation of (network) stack overhead.
> IOW you're traversing a very deep stack once instead of 40 times
> (this is the factor for 64K vs MTU, if we extend beyond 64K (which
> we absolute should do) the benefit would increase as well).
>
> The same should apply to the Crypto API. So even if this was a
> purely software solution with no assembly code at all, it may well
> improve GCM performance (at least for users able to feed us bulk
> data, like networking).
>
At best this would save an indirect call per message, if the underlying
algorithm explicitly added support for it and the user of the API migrated to
the multi-request model. This alone doesn't seem worth the effort of migrating
to multi-request, especially considering the many other already-possible
optimizations that would not require API changes or migrating users to
multi-request. The x86_64 AES-GCM is pretty well optimized now after my recent
patches, but there's still an indirect call associated with the use of the SIMD
helper which could be eliminated, saving one per message (already as much as we
could hope to get from multi-request). authenc on the other hand is almost
totally unoptimized, as I mentioned before; it makes little sense to talk about
any sort of multi-request optimization for it at this point.
- Eric
next prev parent reply other threads:[~2024-06-11 20:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240603183731.108986-1-ebiggers@kernel.org>
[not found] ` <20240603183731.108986-7-ebiggers@kernel.org>
[not found] ` <Zl7gYOMyscYDKZ8_@gondor.apana.org.au>
[not found] ` <20240604184220.GC1566@sol.localdomain>
[not found] ` <ZmAthcxC8V3V3sm3@gondor.apana.org.au>
[not found] ` <ZmAuTceqwZlRJqHx@gondor.apana.org.au>
2024-06-05 9:46 ` [PATCH v4 6/8] fsverity: improve performance by using multibuffer hashing Herbert Xu
2024-06-05 19:14 ` Eric Biggers
2024-06-06 2:00 ` Herbert Xu
2024-06-06 5:28 ` Eric Biggers
2024-06-06 5:41 ` Herbert Xu
2024-06-06 6:58 ` Ard Biesheuvel
2024-06-06 7:34 ` Herbert Xu
2024-06-06 7:55 ` Ard Biesheuvel
2024-06-06 8:08 ` Herbert Xu
2024-06-06 8:33 ` Ard Biesheuvel
2024-06-06 9:15 ` Herbert Xu
2024-06-10 16:42 ` Eric Biggers
2024-06-11 15:21 ` Herbert Xu
2024-06-11 15:39 ` Herbert Xu
2024-06-11 20:32 ` Eric Biggers [this message]
2024-06-11 15:46 ` Ard Biesheuvel
2024-06-11 15:51 ` Herbert Xu
2024-06-11 20:18 ` 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=20240611203209.GB128642@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=ardb@kernel.org \
--cc=bvanassche@acm.org \
--cc=dm-devel@lists.linux.dev \
--cc=fsverity@lists.linux.dev \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=steffen.klassert@secunet.com \
--cc=tim.c.chen@linux.intel.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 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).