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: Async-signal-safe access to __thread variables from dlopen()ed libraries?


On 09/19/2013 05:24 PM, Alexandre Oliva wrote:
> On Sep 18, 2013, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> 
>> We really need a TLS that is both async-signal safe, and can be used from
>> dlopen()ed shared library.
> 
> I suggest you switch to GNU2 TLS, disable lazy relocations, and tune the
> static TLS area reserved by glibc (a tunable we still don't have, but
> probably should) so that all dlopened libs will fit (and thus be
> assigned to) static TLS.  You'll not only get the desired safety, but
> also a significant speed boost to TLS access, if you can reliably
> predict the maximum static TLS segment size the application will need.
 
That seems like a lot of work to ask a user to do to get this right.

On top of the fact that the maximum static TLS segment size might
not be a predictable constant.

Cheers,
Carlos.


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