From: Leonid Ravich <lravich@amazon.com>
To: <linux-crypto@vger.kernel.org>, <dm-devel@lists.linux.dev>
Cc: Eric Biggers <ebiggers@kernel.org>, <linux-block@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <herbert@gondor.apana.org.au>,
<davem@davemloft.net>, <snitzer@kernel.org>,
<mpatocka@redhat.com>, <axboe@kernel.dk>
Subject: Re: [PATCH v5 0/5] crypto: skcipher - multi-data-unit dispatch as a template
Date: Thu, 2 Jul 2026 08:45:34 +0000 [thread overview]
Message-ID: <20260702084534.22846-1-lravich@amazon.com> (raw)
In-Reply-To: <20260701071919.GA111652@sol>
On Wed, Jul 01, 2026 at 12:19:19AM -0700, Eric Biggers wrote:
> No, this didn't address my feedback. It moved things around but still
> adds additional overhead for everyone to support an out-of-tree driver,
> which also hasn't been shown to be any better than just using the CPU.
Eric, thanks for the fast reply.
Overhead: for a non-user the only cost is the data_unit_size field plus
one zeroing store in set_tfm()/ON_STACK; the en/decrypt paths are
untouched. A dun() user pays one indirect dispatch into the template per
request plus a scatterwalk step and IV copy per unit -- the same per-DU
bookkeeping the consumer already open-codes today.
On the driver: I agree pushing code optimized for an out-of-tree driver
is wrong, but I don't think that's the case here -- this helps any async
crypto engine, and there are in-tree async xts(aes) ones dm-crypt is
eligible to use today: HiSilicon SEC2, TI DTHEv2, Atmel (I don't have any
to test on). To bound the win, I used cryptd as a pure async carrier and
moved the per-DU split inside it, then ran dm-crypt + fio: batching cut
CPU ~30% on 128k I/O (large batch) and had zero impact on 4k -- so the
saving is dispatch, not crypto. A real engine that submits a whole
multi-DU request in one descriptor avoids that per-DU dispatch entirely,
so it saves at least that.
So the question for me is what the bar is: does landing the API and dun()
template now (with the in-tree consolidation it already buys dm-crypt and
blk-crypto-fallback), with a throughput demonstration deferred to a real
async provider, work for you ?
Thanks,
Leonid
next prev parent reply other threads:[~2026-07-02 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 8:34 [PATCH v5 0/5] crypto: skcipher - multi-data-unit dispatch as a template Leonid Ravich
2026-06-30 8:34 ` [PATCH v5 1/5] crypto: skcipher - add per-request data_unit_size Leonid Ravich
2026-06-30 8:34 ` [PATCH v5 2/5] crypto: dun - data-unit-number dispatch template Leonid Ravich
2026-06-30 8:34 ` [PATCH v5 3/5] crypto: testmgr - test dun() dispatch Leonid Ravich
2026-06-30 8:34 ` [PATCH v5 4/5] dm crypt: batch a bio segment's sectors via dun() Leonid Ravich
2026-07-01 6:53 ` [PATCH v5 5/5] blk-crypto: fallback - batch a segment's data units " Leonid Ravich
2026-07-01 7:19 ` [PATCH v5 0/5] crypto: skcipher - multi-data-unit dispatch as a template Eric Biggers
2026-07-02 8:45 ` Leonid Ravich [this message]
2026-07-02 16:45 ` 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=20260702084534.22846-1-lravich@amazon.com \
--to=lravich@amazon.com \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-block@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@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