From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1556 invoked by alias); 29 Jan 2013 19:19:53 -0000 Received: (qmail 1546 invoked by uid 22791); 29 Jan 2013 19:19:52 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (213.235.205.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jan 2013 19:19:46 +0000 Received: by one.firstfloor.org (Postfix, from userid 503) id 8F6601A9808E; Tue, 29 Jan 2013 20:19:42 +0100 (CET) Date: Tue, 29 Jan 2013 19:19:00 -0000 From: Andi Kleen To: Torvald Riegel Cc: Andi Kleen , gcc-patches@gcc.gnu.org, rth@redhat.com, Andi Kleen Subject: Re: [PATCH] Add faster HTM fastpath for libitm TSX v2 Message-ID: <20130129191942.GB30577@one.firstfloor.org> References: <1359084657-3498-1-git-send-email-andi@firstfloor.org> <1359465434.3101.12796.camel@triegel.csb> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1359465434.3101.12796.camel@triegel.csb> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01403.txt.bz2 > next time please reply to the points raised in a review if you disagree > with them, and don't just ignore them. That speeds up the review. It was all in the previous email on the topic. > > // See gtm_thread::begin_transaction. > > -uint32_t GTM::htm_fastpath = 0; > > +uint32_t GTM::htm_fastpath asm("__gtm_htm_fastpath") = 0; > > + > > +uint32_t *GTM::global_lock asm("__gtm_global_lock"); > > Rearrange the serial lock's fields (see below). To my knowledge C++ classes have no guaranteed layout, so that's not safe because there is no guarantee where the vtable pointers are. it would be only with plain old structs. + // pr_tryHTM can be set by an assembler fast path when it already tried + // a hardware transaction once. In this case we do one retry less. pr_tryHTM is already documented. -Andi