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] Add compiler barriers around modifications of the robust mutex list.


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


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