* [Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
@ 2026-09-14 17:51 Konstantin Khorenko
2026-09-14 17:54 ` Konstantin Khorenko
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khorenko @ 2026-09-14 17:51 UTC (permalink / raw)
To: devel, Konstantin Khorenko
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
2026-09-14 17:51 [Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module Konstantin Khorenko
@ 2026-09-14 17:54 ` Konstantin Khorenko
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Khorenko @ 2026-09-14 17:54 UTC (permalink / raw)
To: devel, Konstantin Khorenko
On Mon, 14 Sep 2026 19:51:19 +0200, Konstantin Khorenko wrote:
> configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
Applied to branch-rh10-6.12.0-211.52.1.20.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.20.4.vz10, thanks!
[1/1] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/3f8c65349994
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 17:51 [Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module Konstantin Khorenko
2026-09-14 17:54 ` Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox