Re: [PATCH 0/3] raid: remove obsolete MMX optimized code

From: David Laight

Date: Mon Oct 26 2026 - 11:01:11 EST


On Sun, 25 Oct 2026 12:12:04 -0700
Eric Biggers <ebiggers@xxxxxxxxxx> wrote:

> This series retires 32-bit MMX optimizations for RAID.
>
> Affected CPUs, such as the Pentium MMX and Pentium II, will just fall
> back to the existing well-tested scalar code instead.

Seems like a good idea.
I wonder if all that loop unrolling was needed :-)

David

>
> This was the only remaining MMX optimized code in the kernel. MMX
> optimizations for the much more commonly called functions memcpy(),
> copy_page(), and clear_page() were already removed years ago by commit
> c6dbd3e5e69c ("x86/mmx_32: Remove X86_USE_3DNOW"). There are zero MMX
> optimizations for anything else, like crypto or CRC, which left the RAID
> code as an outlier.
>
> Patch 3 also cleans up the CPU feature checks in the RAID6 code.
>
> Eric Biggers (3):
> xor: remove MMX optimized code
> raid6: remove MMX optimized code
> raid6: simplify CPU feature checks
>
> lib/raid/raid6/Makefile | 4 -
> lib/raid/raid6/x86/mmx.c | 118 --------
> lib/raid/raid6/x86/pq_arch.h | 69 +----
> lib/raid/raid6/x86/sse1.c | 136 ---------
> lib/raid/xor/Makefile | 2 +-
> lib/raid/xor/x86/xor-mmx.c | 515 -----------------------------------
> lib/raid/xor/x86/xor_arch.h | 5 -
> 7 files changed, 12 insertions(+), 837 deletions(-)
> delete mode 100644 lib/raid/raid6/x86/mmx.c
> delete mode 100644 lib/raid/raid6/x86/sse1.c
> delete mode 100644 lib/raid/xor/x86/xor-mmx.c
>
>
> base-commit: 21a7f44fd0765fcc5194130b28767786eba1d1e7