[PATCH] Add compiler barriers around modifications of the robust mutex list.

Florian Weimer fweimer@redhat.com
Fri Jan 13 19:45:00 GMT 2017


On 01/13/2017 12:21 PM, Torvald Riegel wrote:
> On Fri, 2017-01-13 at 10:45 +0100, Florian Weimer wrote:
>> On 12/24/2016 12:57 AM, Torvald Riegel wrote:
>>>
>>>     	* nptl/descr.h (ENQUEUE_MUTEX_BOTH, DEQUEUE_MUTEX): Add compiler
>>>     	barriers and comments.
>>>     	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Likewise.
>>>     	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
>>>     	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Likewise.
>>
>> Would you please rebase this patch on current master and repost?  Thanks.
>
> Attached is a patch that is on top of the rebased patch that removes the
> robust mutex assembly code.

I'm wondering if the memory barriers are too strong.  We only need to 
make sure that all writes happen before the barrier.  If we can get 
weaker barriers, maybe we can put them into the macros themselves?

I didn't see any regressions with build-many-glibcs.py, and the test 
suite still passes on armv7hl-redhat-linux-gnueabi, which lacks the prev 
field in the robust list.

Thanks,
Florian



More information about the Libc-alpha mailing list