performance: memcpy vs. __copy_tofrom_user

Matt Sealey matt at genesi-usa.com
Tue Oct 14 13:14:15 EST 2008


Scott Wood wrote:
> Benjamin Herrenschmidt wrote:
>>
>> Yuck.
> 
> Hmm?  It's simple and achieves the desired result (avoiding 
> non-preemptible regions without unduly restricting the ability to 
> extract performance from the hardware).
> 
> Would it be nicer to avoid FP/Altivec in the kernel altogether?  Sure. 
> If the benchmarking says that we're better off with it, though, then so 
> be it.

There should definitely be a nice API for an in-kernel AltiVec context
save/restore. When preemption happens doesn't it do some equivalent of
the userspace context switch? Why can't the preemption system take care
of it?

At worst case you make the worst case latency bigger, but at best case
you gain performance across the board.

One thing which is worrying me is that now that Ben has thrown down the
gauntlet (note, I'm not going to be coding a line, but I know a man who
can :) how on earth do we benchmark the differences here?

-- 
Matt Sealey <matt at genesi-usa.com>
Genesi, Manager, Developer Relations



More information about the Linuxppc-dev mailing list