Pádraig Brady <p...@draigbrady.com> writes:

> On 11/09/2025 00:31, Collin Funk wrote:
>> Pádraig Brady <p...@draigbrady.com> writes:
>> 
>>> This is useful to give better test coverage at least,
>>> and may be useful for users who already may have
>>> GLIBC_TUNABLES defined to tune their environment,
>>> avoiding CPU throttling for example.
>
>> Probably worth documenting this behavior.
>> Although it is hard to imagine that many people use the glibc.cpu
>> tunables to disable capabilities that their hardware supports, one might
>> be surprised that Coreutils checks them unless it is documented.
>
> I might do a "Hardware acceleration" section in the texinfo that
> documents the supported accelerations in cksum, wc, sha*sum etc,
> the configure options (--with-linux-crypto, --with-openssl).
> I could also mention there the honored env vars.

That sounds like a good idea to me.

>> Also, worth mentioning that the OpenSSL implementations of digests won't
>> respect this.
> OpenSSL has its own settings (OPENSSL_ia32cap):
>
>   $ truncate -s1G file.big
>
>   $ time cksum -a sha1 file.big
>   real        0m1.362s
>
>   $ export OPENSSL_ia32cap="0x0"  # Disable all CPU features
>   $ time cksum -a sha1 file.big
>   real        0m1.942s

I did not know about this, thanks. Probably a good argument for the new
documentation section you mentioned earlier.

Collin

Reply via email to