From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62049 invoked by alias); 18 Oct 2016 11:02:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 60542 invoked by uid 89); 18 Oct 2016 11:02:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=upcoming X-HELO: mx1.redhat.com Message-ID: <1476788563.14800.38.camel@localhost.localdomain> Subject: Re: [PATCH] Fix x86 atomic_fetch_xor_release. From: Torvald Riegel To: "Carlos O'Donell" Cc: GNU C Library Date: Tue, 18 Oct 2016 11:02:00 -0000 In-Reply-To: <1eeffe37-c4ec-fef7-537b-9ad17129b6c0@redhat.com> References: <1eeffe37-c4ec-fef7-537b-9ad17129b6c0@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00299.txt.bz2 On Mon, 2016-10-17 at 23:18 -0400, Carlos O'Donell wrote: > Torvald, > > No code uses atomic_fetch_xor_release except for the upcoming conditional > variable rewrite. Therefore there is no user visible bug here. > > The use of atomic_compare_and_exchange_bool_rel is removed (since it doesn't > exist anymore), and is replaced by atomic_compare_exchange_weak_release. > > We use weak_release because it provides better performance in the loop > (the weak semantic) and because the xor is release MO (the release semantic). > > We don't reload expected in the loop because atomic_compare_and_exchange_weak_release > does this for us as part of the CAS failure. > > It is otherwise a fairly plain conversion that fixes building the new condvar > for 32-bit x86. > > I have pushed the new condvar into Fedora Rawhide for testing. > > OK to checkin? OK.