This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Unify pthread_once (bug 15215)
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Chris Metcalf <cmetcalf at tilera dot com>, Torvald Riegel <triegel at redhat dot com>, David Miller <davem at davemloft dot net>, Marcus Shawcroft <marcus dot shawcroft at linaro dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Mike Frysinger <vapier at gentoo dot org>, Andreas Schwab <schwab at linux-m68k dot org>, Steve Ellcey <sellcey at mips dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Fri, 04 Apr 2014 18:33:42 -0400
- Subject: Re: [PATCH] Unify pthread_once (bug 15215)
- Authentication-results: sourceware.org; auth=none
- References: <1368024237 dot 7774 dot 794 dot camel at triegel dot csb> <519D97E4 dot 4030808 at redhat dot com> <1381018836 dot 8757 dot 3598 dot camel at triegel dot csb> <Pine dot LNX dot 4 dot 64 dot 1310071604090 dot 31470 at digraph dot polyomino dot org dot uk> <1381182784 dot 18547 dot 138 dot camel at triegel dot csb> <533605BF dot 9000005 at redhat dot com> <533F3032 dot 10009 at tilera dot com>
On 04/04/2014 06:20 PM, Chris Metcalf wrote:
> On 3/28/2014 7:29 PM, Carlos O'Donell wrote:
>> David, Marcus, Joseph, Mike, Andreas, Steve, Chris,
>>
>> We would like to unify all C-based pthread_once implmentations
>> per the plan in bug 15215 for glibc 2.20.
>>
>> Your machines are on the list of C-based pthread_once implementations.
>>
>> See this for the intial discussions on the unified pthread_once:
>> https://sourceware.org/ml/libc-alpha/2013-05/msg00210.html
>
> There is some performance degradation from the barriers on tilegx,
> but it's not terrible, and it seems like the barriers are necessary,
> so Ack for tile.
Thanks Chris! We've been getting user reports over the years that the
present pthread_once fails in odd ways. This unification is an effort
at having a provable implementation that just works. Hopefully this
saves you debugging a very difficult problem on very parallel tile
hardware :-)
> Before:
>
> "pthread_once": {
> "": {
> "duration": 9.64547e+09, "iterations": 2.09714e+08, "max": 123.997, "min": 44.975, "mean": 45.9935
> }
> }
>
> After:
>
> "pthread_once": {
> "": {
> "duration": 9.69939e+09, "iterations": 1.76321e+08, "max": 165.623, "min": 54.132, "mean": 55.0099
> }
> }
>
Cheers,
Carlos.