Re: [PATCH 8/8] lib/raid/xor: x86: Add AVX-512 optimized xor_gen()

Christoph Hellwig <[email protected]> Fri, 26 Jun 2026 07:47:31 +0200
Newsgroups gmane.linux.uml.devel,gmane.linux.raid,gmane.linux.kernel.cryptoapi,gmane.linux.kernel
Message-ID <[email protected]>
On Thu, Jun 25, 2026 at 09:37:31PM -0700, Eric Biggers wrote:
> +	if (IS_ENABLED(CONFIG_X86_64) && boot_cpu_has(X86_FEATURE_AVX512F) &&
> +	    !boot_cpu_has(X86_FEATURE_PREFER_YMM)) {
> +		/* AVX-512 will be the best; no need to try others. */
> +		/* !PREFER_YMM excludes CPUs with overly-eager downclocking. */

Can you turn this into a single block comment using full sentences?
Right now the two separate comments almost feel contradictory even
if I get what you mean.  While you're at it also through in a blurb
why we dont bother with AVX-512 (number of register, no one in the right
mind would bother running high performance code on modern cpus in 32-bit
mode).