From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC][PATCH 0/5] arch: atomic rework Date: Thu, 20 Feb 2014 11:09:24 -0800 Message-ID: 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> <1392922421.28840.36.camel@triegel.csb> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1392922421.28840.36.camel@triegel.csb> Sender: linux-kernel-owner@vger.kernel.org To: Torvald Riegel Cc: Paul McKenney , 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, Feb 20, 2014 at 10:53 AM, Torvald Riegel wrote: > On Thu, 2014-02-20 at 10:32 -0800, Linus Torvalds wrote: >> On Thu, Feb 20, 2014 at 10:11 AM, Paul E. McKenney >> wrote: >> > >> > You really need that "consume" to be "acquire". >> >> So I think we now all agree that that is what the standard is saying. > > Huh? > > The standard says that there are two separate things (among many more): > mo_acquire and mo_consume. They both influence happens-before in > different (and independent!) ways. > > What Paul is saying is that *you* should have used *acquire* in that > example. I understand. And I disagree. I think the standard is wrong, and what I *should* be doing is point out the fact very loudly, and just tell people to NEVER EVER use "consume" as long as it's not reliable and has insane semantics. So what I "should do" is to not accept any C11 atomics use in the kernel. Because with the "acquire", it generates worse code than what we already have, and with the "consume" it's shit. See? Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f174.google.com ([209.85.128.174]:38116 "EHLO mail-ve0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754933AbaBTTJZ (ORCPT ); Thu, 20 Feb 2014 14:09:25 -0500 MIME-Version: 1.0 In-Reply-To: <1392922421.28840.36.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> <1392922421.28840.36.camel@triegel.csb> Date: Thu, 20 Feb 2014 11:09:24 -0800 Message-ID: Subject: Re: [RFC][PATCH 0/5] arch: atomic rework From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Torvald Riegel Cc: Paul McKenney , 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: <20140220190924.kTlX8MbFnc-DsSKqF6im6zwVyhMizIVSEmRfs3t0t94@z> On Thu, Feb 20, 2014 at 10:53 AM, Torvald Riegel wrote: > On Thu, 2014-02-20 at 10:32 -0800, Linus Torvalds wrote: >> On Thu, Feb 20, 2014 at 10:11 AM, Paul E. McKenney >> wrote: >> > >> > You really need that "consume" to be "acquire". >> >> So I think we now all agree that that is what the standard is saying. > > Huh? > > The standard says that there are two separate things (among many more): > mo_acquire and mo_consume. They both influence happens-before in > different (and independent!) ways. > > What Paul is saying is that *you* should have used *acquire* in that > example. I understand. And I disagree. I think the standard is wrong, and what I *should* be doing is point out the fact very loudly, and just tell people to NEVER EVER use "consume" as long as it's not reliable and has insane semantics. So what I "should do" is to not accept any C11 atomics use in the kernel. Because with the "acquire", it generates worse code than what we already have, and with the "consume" it's shit. See? Linus