From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torvald Riegel Subject: Re: [RFC][PATCH 0/5] arch: atomic rework Date: Thu, 20 Feb 2014 19:44:32 +0100 Message-ID: <1392921872.18779.10287.camel@triegel.csb> References: <1392740258.18779.7732.camel@triegel.csb> <1392752867.18779.8120.camel@triegel.csb> <20140220040102.GM4250@linux.vnet.ibm.com> <20140220083032.GN4250@linux.vnet.ibm.com> <20140220181116.GT4250@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org In-Reply-To: <20140220181116.GT4250@linux.vnet.ibm.com> To: paulmck@linux.vnet.ibm.com Cc: Linus Torvalds , Will Deacon , Peter Zijlstra , Ramana Radhakrishnan , David Howells , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "mingo@kernel.org" , "gcc@gcc.gnu.org" List-Id: linux-arch.vger.kernel.org On Thu, 2014-02-20 at 10:11 -0800, Paul E. McKenney wrote: > But yes, the compiler guys would be extremely happy to simply drop > memory_order_consume from the standard, as it is the memory order > that they most love to hate. > > Getting them to agree to any sort of peep-hole optimization semantics > for memory_order_consume is likely problematic. I wouldn't be so pessimistic about that. If the transformations can be shown to be always correct in terms of the semantics specified in the standard, and if the performance win is sufficiently large, why not? Of course, somebody has to volunteer to actually implement it :) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:19151 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754244AbaBTSpI (ORCPT ); Thu, 20 Feb 2014 13:45:08 -0500 Subject: Re: [RFC][PATCH 0/5] arch: atomic rework From: Torvald Riegel In-Reply-To: <20140220181116.GT4250@linux.vnet.ibm.com> References: <1392740258.18779.7732.camel@triegel.csb> <1392752867.18779.8120.camel@triegel.csb> <20140220040102.GM4250@linux.vnet.ibm.com> <20140220083032.GN4250@linux.vnet.ibm.com> <20140220181116.GT4250@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 20 Feb 2014 19:44:32 +0100 Message-ID: <1392921872.18779.10287.camel@triegel.csb> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: paulmck@linux.vnet.ibm.com Cc: Linus Torvalds , Will Deacon , Peter Zijlstra , Ramana Radhakrishnan , David Howells , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "mingo@kernel.org" , "gcc@gcc.gnu.org" Message-ID: <20140220184432.Bkl60NGNkIRZpPRvdgoLX3xWp6wRuKUdjl1ap26YUmA@z> On Thu, 2014-02-20 at 10:11 -0800, Paul E. McKenney wrote: > But yes, the compiler guys would be extremely happy to simply drop > memory_order_consume from the standard, as it is the memory order > that they most love to hate. > > Getting them to agree to any sort of peep-hole optimization semantics > for memory_order_consume is likely problematic. I wouldn't be so pessimistic about that. If the transformations can be shown to be always correct in terms of the semantics specified in the standard, and if the performance win is sufficiently large, why not? Of course, somebody has to volunteer to actually implement it :)