Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbaBVSyV (ORCPT ); Sat, 22 Feb 2014 13:54:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbaBVSyT (ORCPT ); Sat, 22 Feb 2014 13:54:19 -0500 Subject: Re: [RFC][PATCH 0/5] arch: atomic rework From: Torvald Riegel To: Linus Torvalds 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" In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Date: Sat, 22 Feb 2014 19:53:43 +0100 Message-ID: <1393095223.28840.4914.camel@triegel.csb> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2014-02-20 at 11:09 -0800, Linus Torvalds wrote: > 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. Stating that (1) "the standard is wrong" and (2) that you think that mo_consume semantics are not good is two different things. Making bold statements without a proper context isn't helpful in making this discussion constructive. It's simply not efficient if I (or anybody else reading this) has to wonder whether you actually mean what you said (even if, when reading it literally, is arguably not consistent with the arguments brought up in the discussion) or whether those statements just have to be interpreted in some other way. > So what I "should do" is to not accept any C11 atomics use in the > kernel. You're obviously free to do that. > Because with the "acquire", it generates worse code than what > we already have, I would argue that this is still under debate. At least I haven't seen a definition of what you want that is complete and based on the standard (e.g., an example of what a compiler might do in a specific case isn't a definition). From what I've seen, it's not inconceivable that what you want is just an optimized acquire. I'll bring this question up again elsewhere in the thread (where it hopefully fits better). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/