Re: MMX for memcpy?

From: Horst von Brand (vonbrand@inf.utfsm.cl)
Date: Fri May 12 2000 - 08:59:37 EST


Karel Kulhavy <clock@atrey.karlin.mff.cuni.cz> said:
> I realized some varieties of Pentium can memcpy fater by loading
> MMX registers and then unloading them. Is it meaningful to use this
> for optimizing memcpy actions used by kernel? Could SSE help on processors
> which support SSE?

MMX registers are the FP registers, so you'd clobber them (FP in kernel is
off-limits in part for this reason). Besides, I remember that switching
into/out of MMX mode is _very_ costly, so much so that this doesn't buy you
anything unless you do very large copies. And those are rare enough not to
bother.

> Where is the memcpy in kernel placed? In kernel sources, or in libc?

The kernel doesn't use libc at all.

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:20 EST