On 12/09/2025 18:34, Pádraig Brady wrote:
The attached 2 patches, add a new cpu-supports module, and updates the crc-x86_64 module to use it. This ensures that any users of the crc-x86_64 module will honor the GLIBC_TUNABLES environment variable. Specifically it will allow disabling of the hardware acceleration used by crc-x86_64 using:export GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX Note this is a general mechanism provided by glibc to tune hardware acceleration within glibc and also determines what libs are loaded with its dynamic dispatch mechanism: On my "x86-64-v3" system for example: $ ld.so --help | grep -B1 x86-64-v Subdirectories of glibc-hwcaps directories, in priority order: x86-64-v4 x86-64-v3 (supported, searched) x86-64-v2 (supported, searched) $ ld.so --help | GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX \ grep -B1 x86-64-v Subdirectories of glibc-hwcaps directories, in priority order: x86-64-v4 x86-64-v3 (supported, searched) x86-64-v2 (supported, searched)$ ld.so --help | grep -B1 x86-64-v
Oops, I applied the variable to the wrong process :) That should of course read: $ ld.so --help | grep -B1 x86-64-v Subdirectories of glibc-hwcaps directories, in priority order: x86-64-v4 x86-64-v3 (supported, searched) x86-64-v2 (supported, searched) $ GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX ld.so --help | grep -B1 x86-64-v Subdirectories of glibc-hwcaps directories, in priority order: x86-64-v4 x86-64-v3 x86-64-v2 (supported, searched) cheers, Padraig
