[PATCH v2 2/3] powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision
Segher Boessenkool
segher at kernel.crashing.org
Tue Sep 26 21:26:24 AEST 2017
On Tue, Sep 26, 2017 at 03:34:36PM +1000, Michael Ellerman wrote:
> Cyril Bur <cyrilbur at gmail.com> writes:
> > This was written for userspace which doesn't have to explicitly enable
> > VMX in order to use it - we need to be smarter in the kernel.
>
> Well the kernel has to do it for them after a trap, which is actually
> even more expensive, so arguably the glibc code should be smarter too
> and the threshold before using VMX should probably be higher than in the
> kernel (to cover the cost of the trap).
A lot of userspace code uses V*X, more and more with newer CPUs and newer
compiler versions. If you already paid the price for using vector
registers you do not need to again :-)
> But I digress :)
Yeah sorry :-)
Segher
More information about the Linuxppc-dev
mailing list