NVIDIA and TLS

Alexander Kabaev kabaev at mail.ru
Mon Jun 16 19:02:33 PDT 2003


On Mon, 16 Jun 2003 18:43:50 -0700
Gareth Hughes <gareth at nvidia.com> wrote:

> No, this is simply not true.
> 
> If your thread library implementation is that much better than
> anything else out there, simply support the dynamic access models
> (General Dynamic and Local Dynamic) only. 

You do not understand. Whether or not it is better only time will tell.
ELF TLS standard is defined in a way, that only a _specific_ threads
implementation can reap full benefits, most other are penalized by the
segment access reloads on every thread context switch.

> 
> One of the benefits of the Linux implementation is that it allows
> the static TLS access methods (Initial Exec and Local Exec) to be
> used.  If your implementation fundamentally can't support these
> access models, then just don't support them.

So the choice is either to pay penalty implementing TLS through callable
entry, or by making context switches more expensive than they have to
be.

I am obviously not thrilled with the standard, but I guess I'll have
live with it since I have nothing better to offer on my own anyway.


More information about the freebsd-threads mailing list