Re: MMX for kernel

Olaf Titz (
07 Feb 1997 12:02:09 +0100

Jason Flynn <> wrote:
> isn't it the process of clearing the registers (cos MMX and FPU
> use the sam ones) and clearing the pipeline that takes these cycles ?
> And surely this would be done anyway during task switching so
> the only extra overhead is if you mix types within one task.

If the active task uses FPU registers, you have to save and restore
the FPU state (unless you are sure the FPU is clear, but this can't be
assured in the kernel). This alone takes really many cycles, at least
174 of them in the best case (all cache hits), not even counting mode
switches, clearing etc.

Don't even think of using MMX in an interrupt routine, e.g. for
calculating IP checksums. The overhead is too high.


___ or @{stud,informatik}       ____
__ o           <URL:>     <IRC:praetorius>
__/<_              >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____