Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2003 18:43:50 -0700
From:      Gareth Hughes <gareth@nvidia.com>
To:        'Alexander Kabaev' <kabaev@mail.ru>
Cc:        Daniel Eischen <eischen@pcnet.com>
Subject:   RE: NVIDIA and TLS
Message-ID:  <2D32959E172B8F4D9B02F68266BE421401A6D7E8@mail-sc-3.nvidia.com>

next in thread | raw e-mail | index | archive | help
On Mon, 16 Jun 2003, Alexander Kabaev wrote:
> 
> That was very nice of them to develop a "standard" which penalises each
> and every threads implementation except pure kernel-based threads Linux
> happens to implement now.
> 
> Said that, I think FreeBSD will have to follow the suit sooner or later.
> When the mass of Linux software using TLS reaches certain level, we'll
> be unable to ignore its requirements. It is sad though that we'll have
> to give up a some of our performance optimizations.  

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.  Both of these models
require at least one function call to access __thread variables
(the former requiring one per access, while the latter is one for
the first __thread variable accessed in a given function).  This
will work just fine, no matter how you've implemented your
threading library.

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.

-- 
Gareth Hughes (gareth@nvidia.com)
OpenGL Developer, NVIDIA Corporation



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2D32959E172B8F4D9B02F68266BE421401A6D7E8>