This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Optimize generic spinlock code and use C11 like atomic macros.
- From: Torvald Riegel <triegel at redhat dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, szabolcs dot nagy at arm dot com, marcus dot shawcroft at gmail dot com, pb at pbcl dot net, "Joseph S. Myers" <joseph at codesourcery dot com>, rth at twiddle dot net, Carlos O'Donell <carlos at redhat dot com>, vapier at gentoo dot org, schwab at suse dot de, cmetcalf at mellanox dot com, david at holsgrove dot tech, chunglin_tang at mentor dot com, munroesj at linux dot vnet dot ibm dot com, davem at davemloft dot net
- Date: Sun, 09 Apr 2017 15:51:43 +0200
- Subject: Re: [PATCH 1/2] Optimize generic spinlock code and use C11 like atomic macros.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=triegel at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8932FC05974C
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8932FC05974C
- References: <1481905917-15654-1-git-send-email-stli@linux.vnet.ibm.com> <5857CF10.1060100@arm.com> <628f6311-239c-5eea-572c-c2acae6fcbee@linux.vnet.ibm.com> <1487017743.16322.80.camel@redhat.com> <60a34645-17e4-6693-1343-03c55b0c47ad@linux.vnet.ibm.com> <1487437038.20203.68.camel@redhat.com> <25ad863b-6f20-bfb7-95e6-3b04a2b3eee8@linux.vnet.ibm.com> <1487598702.20203.138.camel@redhat.com> <b57d3477-a041-7b06-82ac-6d2b6c6bb08c@linux.vnet.ibm.com> <1491487245.5374.161.camel@redhat.com> <09ae8ea7-4119-76c1-cd58-36cbdf587390@linux.vnet.ibm.com>
On Fri, 2017-04-07 at 18:22 +0200, Stefan Liebler wrote:
> On 04/06/2017 04:00 PM, Torvald Riegel wrote:
> > Otherwise, this patch looks good to me.
> Thanks for review. Here is an updated patch. I've changed the comments
> and added the POSIX requirement in pthread_spin_trylock.
I assume that this means that you have taken care of all the review
comments I have and changed nothing else; thus, I won't review this in
detail again. (If there have been other changes, please let me know so
that I can look at them specifically.)
> @architecture maintainers:
> I've added defines of ATOMIC_EXCHANGE_USES_CAS in the architecture
> specific atomic-machine.h files.
> See comment in include/atomic.h:
> /* ATOMIC_EXCHANGE_USES_CAS is equal to 1 if atomic_exchange operations
> are implemented based on a CAS loop; otherwise, this is 0 and we assume
> that the atomic_exchange operations could provide better performance
> than a CAS loop. */
>
> Can review the definition to 0 or 1 in the atomic-machine.h file of your
> architecture, please?
I think we primarily need feedback from the maintainers of the
architectures where we're not quite sure. Let's see how responsive
everyone is and then decide whether we need to continue pinging some of
them potentially or whether we have enough information to be able to
commit the patch.