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 v8 2/8] nptl: Add C11 threads mtx_* functions


On 07/13/2018 03:08 PM, Adhemerval Zanella wrote:


On 12/07/2018 17:38, Florian Weimer wrote:
On 07/12/2018 10:30 PM, Adhemerval Zanella wrote:

I'm concerned about this because in the future, we might compile the implementations to remove checks that are not needed for the C11 implementations.

Why kind of scenario do you have in mind? Maybe use a more streamlined
internal implementation for C11 threads?

Yes, the polymorphic mutex types must have *some* overhead (think of speculatively executing the wrong atomics), and less polymorphism should improve performance.

I think it would quite feasible in next releases to refactor the mutex
code into C11 required operation and POSIX one and optimize C11
implementation with a simpler internal one. The bulk of the work is
disentangle the mutex code (I started to check on this sometime ago,
but got sidetracked).

Sure, we can delay this work somewhat, but I'd like to backport the optimization into 2.28 once we have it, to discourage such invalid uses.

Thanks,
Florian


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