[PATCH 3/7] crypto: powerpc/md5 - Remove PowerPC optimized MD5 code
Eric Biggers
ebiggers at kernel.org
Mon Aug 4 08:56:52 AEST 2025
On Sun, Aug 03, 2025 at 05:27:01PM -0500, Segher Boessenkool wrote:
> You are replacing a known-working target implementation by a lower
> performance generic implementation.
That's probably correct, though FWIW there have been quite a few cases
where optimized assembly code in the kernel actually turned out to be
slower than the C code. (That primarily happens when the assembly code
doesn't take advantage of any special CPU features, which was the case
for this PowerPC code.) I don't have PowerPC hardware to check the
exact performance differential here, but IMO even if there was a
slowdown the factors still weigh strongly in favor of retiring this.
> But is that one known-working at all? Does it come with tests? Was
> it tested to have the same outputs as the existing thing, maybe? Just
> on a few inputs maybe.
Of course. Patch 7 adds a KUnit test suite for MD5, and there are still
the older tests in crypto/testmgr.c. And of course generic code is much
easier to test than arch-specific code. So not only is it tested, but
the test coverage is much better than it was before.
- Eric
More information about the Linuxppc-dev
mailing list