Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932082AbaBTTJ1 (ORCPT ); Thu, 20 Feb 2014 14:09:27 -0500 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 X-Google-Sender-Auth: FNt0BszzdWa3n8O7WLLnulEOVM4 Message-ID: Subject: Re: [RFC][PATCH 0/5] arch: atomic rework From: Linus Torvalds 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" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 -- 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/