linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: dm-devel@lists.linux.dev, Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH 0/4] Optimize dm-verity using 2-way interleaved SHA-256 hashing
Date: Tue, 14 Oct 2025 14:16:53 -0700	[thread overview]
Message-ID: <20251014211657.113603-1-ebiggers@kernel.org> (raw)

This series makes dm-verity take advantage of the 2-way interleaved
SHA-256 hashing code that was added in 6.18.  fsverity already does
this; this brings the same optimization to dm-verity.  This increases
SHA-256 hashing throughput by up to 98% on x86_64 and 70% on arm64.

To make this possible, this series makes dm-verity use the SHA-256
library when the hash algorithm is SHA-256 (which it usually is).  That
actually provides a ~2% performance improvement by itself, in addition
to the larger improvement from interleaved hashing on x86_64 and arm64.

As usual, I verified that 'verity-compat-test' still passes.

This series is targeting linux-dm/for-next.

Eric Biggers (4):
  dm-verity: remove log message with shash driver name
  dm-verity: use SHA-256 library for SHA-256
  dm-verity: reduce scope of real and wanted digests
  dm-verity: use 2-way interleaved SHA-256 hashing when supported

 drivers/md/Kconfig            |   1 +
 drivers/md/dm-verity-fec.c    |  21 ++--
 drivers/md/dm-verity-fec.h    |   5 +-
 drivers/md/dm-verity-target.c | 203 +++++++++++++++++++++++++---------
 drivers/md/dm-verity.h        |  52 +++++----
 5 files changed, 196 insertions(+), 86 deletions(-)


base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
-- 
2.51.0


             reply	other threads:[~2025-10-14 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 21:16 Eric Biggers [this message]
2025-10-14 21:16 ` [PATCH 1/4] dm-verity: remove log message with shash driver name Eric Biggers
2025-10-14 21:16 ` [PATCH 2/4] dm-verity: use SHA-256 library for SHA-256 Eric Biggers
2025-10-14 21:16 ` [PATCH 3/4] dm-verity: reduce scope of real and wanted digests Eric Biggers
2025-10-14 21:16 ` [PATCH 4/4] dm-verity: use 2-way interleaved SHA-256 hashing when supported 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=20251014211657.113603-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=agk@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --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;
as well as URLs for NNTP newsgroup(s).