Also, you don't even need to use MMX - the same trick is accomplished
using the FPU registers. Note that I just had a look though the FPU
memcpy patch the other day, and it's not entirely correct, especially the
copy_(to|from)_user stuff. Some improvements that need to be made to the
patch before it's integrated are:
a) when saving FPU state, it should be saved to task that it
belongs to. (see the scheduler lazy-FPU saving tricks)
b) only bother saving the FPU state if the last user of the FPU
was a user process
c) perhaps add a fallback mechanism for machines that don't have
an FPU, or where the FPU is slow? That way the one-kernel-fits-all people
can still get the performance benefit.
Note that it might be worthwhile to move the memcpy code out of the inline
stream and instead use a quick call with register parameters (akin to some
of the funky spinlock code).
-ben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu