Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Martin Husemann wrote:

> On Thu, Jun 02, 2011 at 09:21:11PM +0100, David Laight wrote:
> > Passing 'l' is a register rename (or copy) so is almost zero cost.
> > 
> > Recovering curlwp may involve a function call, and is, at best, a real
> > memory access of global data (possibly via an asm statement) that will
> > be slow and multiple accesses might need caching in a local anyway.
> 
> I wonder on what archs we would be able to do the MIPS curlwp optimization
> (place curlwp in a reserved register).
> 
> Sparc64 and sparc will likely follow this in the near future (needs some audit
> and will do some benchmarks first; it closely resembles TLS for userland).
> 
> What's the cost on other archs and what optimizations are possible?

As far as I could tell, the change to put curlwp in a register was never
actually benchmarked on MIPS.  I asked a few times and never got an
answer, other than that a kernel was about 2.5kB smaller.

I'd be rather curious that if other arches investigate this, especially
if there's some performance data to back up the change this time around.

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index