From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: devel@openvz.org, Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
Date: Mon, 14 Sep 2026 19:51:19 +0200 [thread overview]
Message-ID: <20260914-temp2-v1-1-07379e4ed812@virtuozzo.com> (raw)
lib/libcrc32c.c binds a static tfm once, in libcrc32c_mod_init(), a
device_initcall that runs early at boot. With CRYPTO_CRC32C_INTEL=m the
accelerated driver has not registered yet, so the tfm binds to
crc32c-generic and keeps it: loading the module later cannot rebind it,
it just sits there unused. Every crc32c() caller then runs the software
crc32_body path instead of the CPU's CRC32 instruction, which lands on
every ext4/xfs/btrfs/nvme/dm-integrity checksum.
Building the driver in makes its initcall run before
libcrc32c_mod_init(), since arch/x86/ links before lib/ and both are
device_initcall. The tfm then binds to crc32c-intel from the first
allocation.
This does not remove the crypto shash wrapper crc32c() still goes
through; a direct arch-dispatch implementation would still be faster.
https://virtuozzo.atlassian.net/browse/VSTOR-145125
Feature: crc32c: hardware-accelerated checksum
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL | 1 +
1 file changed, 1 insertion(+)
diff --git a/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL b/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL
new file mode 100644
index 0000000000000..d4f84f727c85c
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL
@@ -0,0 +1 @@
+CONFIG_CRYPTO_CRC32C_INTEL=y
---
base-commit: ef994d2c62a1d045543fe80aaf584139b22fbaf7
change-id: 20260914-temp2-fe6929d95c5d
Best regards,
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next reply other threads:[~2026-09-14 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 17:51 Konstantin Khorenko [this message]
2026-09-14 17:54 ` Konstantin Khorenko
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=20260914-temp2-v1-1-07379e4ed812@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.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.