This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH glibc] pthread_setspecific: Provide signal-safety across keys


----- On Oct 18, 2017, at 5:34 PM, Florian Weimer fw@deneb.enyo.de wrote:

> * Mathieu Desnoyers:
> 
>> I understand that there is a performance benefit in using
>> the initial-exec model over the global-dynamic. Given liburcu
>> tends to be used on fast-paths, should I simply move all
>> liburcu TLS variables to the IE model ?
> 
> That should be okay.
> 
> The situation for dlopen will improve because we will eventually offer
> some tuning knobs, so that it's possible to increase the reserve in
> anticipation of future dlopen calls.
> 
> Right now, if your libraries are compatible with LD_PRELOAD, that
> would also be a workable solution, I think.

I also figured I can introduce that TLS model change without bumping the
library soname, even though those TLS symbols are exposed, because the
link-editor figures out at runtime which reloc to apply based on the
TLS model.

This basically means the __attribute__((tls_model("initial-exec"))) should
be applied to the definition, and the declaration of the TLS does not need
any attribute. The link-editor will figure out the right reloc to apply
at link-time, thus modifying the code of the TLS accesses.

Let me know if I misunderstand that part,

Thanks!

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]