NVIDIA and TLS

Terry Lambert tlambert2 at mindspring.com
Mon Jun 16 22:35:08 PDT 2003


Gareth Hughes wrote:
> Or, better yet, to make sure no problems arise when you change the internals
> of your data structures:
> 
> %gs ----->[libGL stuff (16 words, say)      ]
>           [threadsystem-thread-specific-data]
>           [ stuff                           ]
> 
> You reserve the first 16 words of your thread data structure for us, and
> we're done.  At least when this library is being used.

This would really suck on most systems because of the cache
line misses.  The thread specific data for the threading
system wants to be in a cache line aligned memory location,
and not exceed a cache line in length.

You are running multiple threads: surely it's more important,
in general, for threads context switch to be fast from your
perspective?

-- Terry


More information about the freebsd-threads mailing list