__thread fastpath not being taken

2009-12-09 Thread Chris Metcalf
The __tls_get_addr() routine is called by the compiler for __thread accesses (barring optimizations, IE mode, etc). But I'm confused by how the "generation" code flow is supposed to work. The dlopen() and dlclose() routines, for example, both increment the global _dl_tls_generation counter after

Re: __thread fastpath not being taken

2009-12-11 Thread Austin Foxley
On 12/09/2009 11:09 AM, Chris Metcalf wrote: My proposed fix is something like the following, in dl-tls.c. (I'm running code patched up from the old SVN NPTL branch, but looking at the latest GIT NPTL it seems pretty similar here.) Obviously a real patch would re-indent all the code contained w

Re: __thread fastpath not being taken

2009-12-15 Thread Carmelo AMOROSO
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Austin Foxley wrote: > On 12/09/2009 11:09 AM, Chris Metcalf wrote: >> My proposed fix is something like the following, in dl-tls.c. (I'm >> running code patched up from the old SVN NPTL branch, but looking at the >> latest GIT NPTL it seems pretty si

Re: __thread fastpath not being taken

2009-12-15 Thread Chris Metcalf
On 12/15/2009 9:07 AM, Carmelo AMOROSO wrote: > Austin Foxley wrote: > >> On 12/09/2009 11:09 AM, Chris Metcalf wrote: >> >>> My proposed fix is something like the following, in dl-tls.c. (I'm >>> running code patched up from the old SVN NPTL branch, but looking at the >>> latest GIT NPTL

Re: __thread fastpath not being taken

2010-10-13 Thread Chris Metcalf
In my email quoted below, I found that __tls_get_addr() under the uClibc version we were running with was always running the slow path. We were running an old version from the nptl branch, back at change 22990 on svn. Since then, I've ported glibc-2.11.2 to tile. I looked at the performance of