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: [PATCH] Async signal safe TLS accesses


On 11/30/2013 02:16 PM, Alexandre Oliva wrote:
> On Nov 29, 2013, "Carlos O'Donell" <carlos@redhat.com> wrote:
> 
>> The one page is wasted for the sake of simplicity of implementation
>> and maintenance. The more complex this code becomes the harder it 
>> is to review for AS-safety.
> 
> While I agree with the latter sentence in principle, I think this goes
> too far in complexity-avoidance, and I claim we already have a
> provably-safe allocation strategy that reuses malloc, does not incur
> such waste, and is very performant.
> 
> I've already alluded to it in my earlier email: using the existing
> malloc implementation with an arena that is only ever locked when
> signals are disabled.
> 
> Why is this AS-Safe?

[snip detailed AS-Safe reasoning for malloc]

Your reasoning seems quite sound, but for now, given that Google has
already done the work, and there is no public API discussion, I'm
going to leave this discussion until further down the road when we
go back to address having a public AS-Safe allocation API that users
can use. In that contact I think we'll need to have a discussion
about malloc-based vs. something else.

Cheers,
Carlos.


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