mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 23:22:27 +00:00
992be8b50a
Copy faster implementation of crc32c from linux kernel as of 6.5-rc7 (x86_64, arch/x86/crypto/crc32c-pcl-intel-asm_64.S). This needs assembler build support, so detect target architecture so cross-compilation still works. Add a special CPU flag so the old and new implementations can be benchmarked and verified separately. Sample benchmark: CPU flags: 0x1ff CPU features: SSE2 SSSE3 SSE41 SSE42 SHA AVX AVX2 CRC32C_PCL Block size: 4096 Iterations: 1000000 Implementation: builtin Units: CPU cycles NULL-NOP: cycles: 77177218, cycles/i 77 NULL-MEMCPY: cycles: 226313072, cycles/i 226, 62133.395 MiB/s CRC32C-ref: cycles: 24418596066, cycles/i 24418, 575.859 MiB/s CRC32C-NI: cycles: 1188335920, cycles/i 1188, 11833.073 MiB/s CRC32C-PCL: cycles: 463193456, cycles/i 463, 30358.037 MiB/s XXHASH: cycles: 851606646, cycles/i 851, 16511.916 MiB/s SHA256-ref: cycles: 74476234956, cycles/i 74476, 188.808 MiB/s SHA256-NI: cycles: 34198637428, cycles/i 34198, 411.177 MiB/s BLAKE2-ref: cycles: 14761411664, cycles/i 14761, 952.597 MiB/s BLAKE2-SSE2: cycles: 18101896796, cycles/i 18101, 776.807 MiB/s BLAKE2-SSE41: cycles: 12599091062, cycles/i 12599, 1116.087 MiB/s BLAKE2-AVX2: cycles: 9668247506, cycles/i 9668, 1454.418 MiB/s The new implementation is about 2.5x faster. Note: there new version does not work on musl because of linkage problems (relocations in .rodata), so it's still using the old implementation. Signed-off-by: David Sterba <dsterba@suse.com>
58 lines
1.8 KiB
PHP
58 lines
1.8 KiB
PHP
# Variables set during configure phase:
|
|
# * build environment, paths
|
|
# * features (eg. convert, documentation)
|
|
export
|
|
|
|
CC = @CC@
|
|
LN_S = @LN_S@
|
|
AR = @AR@
|
|
RM = @RM@
|
|
RMDIR = @RMDIR@
|
|
INSTALL = @INSTALL@
|
|
DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@
|
|
DISABLE_BTRFSCONVERT = @DISABLE_BTRFSCONVERT@
|
|
BUILD_PROGRAMS = @BUILD_PROGRAMS@
|
|
BUILD_SHARED_LIBRARIES = @BUILD_SHARED_LIBRARIES@
|
|
BUILD_STATIC_LIBRARIES = @BUILD_STATIC_LIBRARIES@
|
|
BTRFSCONVERT_EXT2 = @BTRFSCONVERT_EXT2@
|
|
BTRFSCONVERT_REISERFS = @BTRFSCONVERT_REISERFS@
|
|
COMPRESSION_LZO = @COMPRESSION_LZO@
|
|
COMPRESSION_ZSTD = @COMPRESSION_ZSTD@
|
|
PYTHON_BINDINGS = @PYTHON_BINDINGS@
|
|
PYTHON = @PYTHON@
|
|
PYTHON_CFLAGS = @PYTHON_CFLAGS@
|
|
CRYPTOPROVIDER_BUILTIN = @CRYPTOPROVIDER_BUILTIN@
|
|
CRYPTO_CFLAGS = @GCRYPT_CFLAGS@ @SODIUM_CFLAGS@ @KCAPI_CFLAGS@
|
|
|
|
HAVE_CFLAG_msse2 = @HAVE_CFLAG_msse2@
|
|
HAVE_CFLAG_msse41 = @HAVE_CFLAG_msse41@
|
|
HAVE_CFLAG_mavx2 = @HAVE_CFLAG_mavx2@
|
|
HAVE_CFLAG_msha = @HAVE_CFLAG_msha@
|
|
TARGET_CPU = @target_cpu@
|
|
HAVE_GLIBC = @HAVE_GLIBC@
|
|
|
|
SUBST_CFLAGS = @CFLAGS@
|
|
SUBST_LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS_BASE = @UUID_LIBS@ @BLKID_LIBS@ @LIBUDEV_LIBS@ -L. -pthread
|
|
LIBS_COMP = @ZLIB_LIBS@ @LZO2_LIBS@ @ZSTD_LIBS@
|
|
LIBS_PYTHON = @PYTHON_LIBS@
|
|
LIBS_CRYPTO = @GCRYPT_LIBS@ @SODIUM_LIBS@ @KCAPI_LIBS@
|
|
STATIC_LIBS_BASE = @UUID_LIBS_STATIC@ @BLKID_LIBS_STATIC@ -L. -pthread
|
|
STATIC_LIBS_COMP = @ZLIB_LIBS_STATIC@ @LZO2_LIBS_STATIC@ @ZSTD_LIBS_STATIC@
|
|
|
|
prefix ?= @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = @bindir@
|
|
libdir ?= @libdir@
|
|
incdir = @includedir@
|
|
udevdir = @UDEVDIR@
|
|
udevruledir = ${udevdir}/rules.d
|
|
pkgconfigdir = @pkgconfigdir@
|
|
|
|
# external libs required by various binaries; for btrfs-foo,
|
|
# specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules in Makefile
|
|
btrfs_convert_libs = @EXT2FS_LIBS@ @COM_ERR_LIBS@ @REISERFS_LIBS@
|
|
|
|
MAKEFILE_INC_INCLUDED = yes
|