This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2] powerpc: Spinlock optimization and cleanup
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "triegel at redhat dot com" <triegel at redhat dot com>, "rth at twiddle dot net" <rth at twiddle dot net>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Steve Munroe <sjmunroe at us dot ibm dot com>
- Date: Thu, 01 Oct 2015 10:18:28 +0100
- Subject: Re: [PATCHv2] powerpc: Spinlock optimization and cleanup
- Authentication-results: sourceware.org; auth=none
- References: <560C0DA6 dot 5060409 at linux dot vnet dot ibm dot com>
On 30/09/15 17:28, Paul E. Murphy wrote:
---8<---
This patch optimizes powerpc spinlock implementation by:
...
The glibc pthread spinlock semantics is weaker than what
posix requires, I'm wondering if this is expected to stay
or glibc might want to switch to stronger semantics.
is it worthwhile to add optimized asm with weak semantics
for other targets that currently use the generic c code?
(the issue is that for correct pthread_spin_trylock behavior
the lock should be seqcst instead of acquire and the unlock
should be release instead of barrier+store otherwise trylock
can spuriously report locked state).