Subject: Re: performance: memcpy vs. __copy_tofrom_user

From: Matt Sealey <[email-masked]>
Date: Mon, 13 Oct 2008 21:14:15 -0500

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 <[email-masked]>
Genesi, Manager, Developer Relations