tech-userlevel archive

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

Re: TLS status



On Thu, Nov 17, 2011 at 01:36:17AM +0100, Jean-Yves Migeon wrote:
> On 17.11.2011 00:28, David Holland wrote:
> > On Wed, Nov 16, 2011 at 02:51:38PM +0100, Joerg Sonnenberger wrote:
> >   >  Hi all,
> >   >  I was asked to give an update to the last TLS status report.
> >   >  [...]
> >
> > Has anyone got around to measuring the performance impact on
> > non-threaded programs? (Or on threaded programs...)
> >
> > (I know, I keep asking but haven't done it myself, so I'm sure someone
> > will tell me to pipe down... ;-) )
> 
> I can give it a try saturday/sunday. I need to check that TLS works
> fine with i386/amd64 Xen (and/or provide a core dump to Joerg ;) ),
> and have to torture my rewrite of xbdback(4) (MP-safe patch).
> 
> Any advice on the benchmarks you would like to see (preferably
> available from pkgsrc?)

There are basically two things that are changed. Context switch overhead
is a bit larger e.g. on x86, since it is now properly updating fs/gs
and/or the base registers. For AMD64, look at the time around 1.58 of
locore.S (aka July 2010).

The second change is essentially runtime of pthread_self(3). Before, it
was doing evil magic to read the value from the stack, now it is using
fs/gs relative addressing on x86. Other platforms have other mechanisms
deployed here.

Joerg


Home | Main Index | Thread Index | Old Index