Re: [RFC patch 7/7] [PATCH] glibc: nptl: Add support for attached pthread_mutexes

2016-04-03 Thread Thomas Gleixner
On Sat, 2 Apr 2016, Peter Zijlstra wrote: > On Sat, Apr 02, 2016 at 11:09:20AM -, Thomas Gleixner wrote: > > To undo the attachment each involved thread needs to call > > > > pthread_mutex_detach_np(&mutex); > > > > When the last user detaches the kernel state is destroyed. > > S

Re: [RFC patch 7/7] [PATCH] glibc: nptl: Add support for attached pthread_mutexes

2016-04-02 Thread Peter Zijlstra
On Sat, Apr 02, 2016 at 06:30:59PM +0200, Peter Zijlstra wrote: > On Sat, Apr 02, 2016 at 11:09:20AM -, Thomas Gleixner wrote: > > pthread_mutexes on Linux are based on the futex mechanism. The standard > > futex > > mechanism in the Linux kernel uses a global hash to store transient > > state

Re: [RFC patch 7/7] [PATCH] glibc: nptl: Add support for attached pthread_mutexes

2016-04-02 Thread Peter Zijlstra
On Sat, Apr 02, 2016 at 11:09:20AM -, Thomas Gleixner wrote: > pthread_mutexes on Linux are based on the futex mechanism. The standard futex > mechanism in the Linux kernel uses a global hash to store transient > state. Collisions on that hash can lead to performance degradation and on > real-t

[RFC patch 7/7] [PATCH] glibc: nptl: Add support for attached pthread_mutexes

2016-04-02 Thread Thomas Gleixner
pthread_mutexes on Linux are based on the futex mechanism. The standard futex mechanism in the Linux kernel uses a global hash to store transient state. Collisions on that hash can lead to performance degradation and on real-time enabled kernels even to priority inversions. To guarantee futexes wi