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 07/15] Add the low level infrastructure for pthreads lockelision with TSX


On Sat, Dec 22, 2012 at 07:02:34PM -0800, Andi Kleen wrote:
> - pthread_mutex_destroy of a lock mutex will not return EBUSY but 0.
> - mutex appears free when elided.
>   pthread_mutex_lock(mutex);
>   if (pthread_mutex_trylock(mutex) != 0) do_something
>   will not do something when the lock elided.
>   However note that if the check is an assert it works as expected because the
>   assert failure aborts and the region is re-executed non transactionally,
>   with the old behaviour.
> [...]
> Currently elision is enabled by default on systems that support RTM,
> unless explicitely disabled either in the program or by the user.
> Given more experience we can decide if that is a good idea, or if it
> should be opt-in.

This kind of non-conformant behavior makes it unacceptable for elision
to be enabled by default. Is there any way around it?

Rich


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