Re: performance: memcpy vs. __copy_tofrom_user
From: Matt Sealey <hidden>
Date: 2008-10-14 02:14:35
Scott Wood wrote:
Benjamin Herrenschmidt wrote:quoted
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 [off-list ref] Genesi, Manager, Developer Relations