From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754954AbcESNnb (ORCPT ); Thu, 19 May 2016 09:43:31 -0400 Received: from e17.ny.us.ibm.com ([129.33.205.207]:36685 "EHLO e17.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463AbcESNn3 (ORCPT ); Thu, 19 May 2016 09:43:29 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Thu, 19 May 2016 06:43:31 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Peter Hurley , Waiman Long , Ingo Molnar , linux-kernel@vger.kernel.org, Davidlohr Bueso , Jason Low , Dave Chinner , Scott J Norton , Douglas Hatch , kcc@google.com, dvyukov@google.com, dhowells@redhat.com Subject: Re: [PATCH v2] locking/rwsem: Add reader-owned state to the owner field Message-ID: <20160519134331.GM3528@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <573615AD.60300@hurleysoftware.com> <20160516110948.GM3193@twins.programming.kicks-ass.net> <20160516121719.GC3528@linux.vnet.ibm.com> <5739D686.302@hurleysoftware.com> <20160516175041.GR3193@twins.programming.kicks-ass.net> <573B6DC8.2030902@hurleysoftware.com> <20160517194607.GO3528@linux.vnet.ibm.com> <20160518110555.GE3193@twins.programming.kicks-ass.net> <20160518172606.GU3528@linux.vnet.ibm.com> <20160519090013.GU3193@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160519090013.GU3193@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16051913-0041-0000-0000-0000042D7548 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2016 at 11:00:13AM +0200, Peter Zijlstra wrote: > On Wed, May 18, 2016 at 10:26:06AM -0700, Paul E. McKenney wrote: > > On Wed, May 18, 2016 at 01:05:55PM +0200, Peter Zijlstra wrote: > > > > Alternatively, could we try and talk to our GCC friends to make sure GCC > > > doesn't tear loads/stores irrespective of what the C language spec > > > allows? > > > > Interestingly enough, they used to make that guarantee, but removed it > > when C11 showed up. > > Did someone tell them this was a regression and have them fix it? They > can't just change things like this. I did, informally. I was told that the atomics were to replace them. I have been bugging them about volatile ever since, given that some people would dearly like to eliminate volatile from the language. (I believe I am making good progress on preventing this, with a lot of help more recently.) > > Me, I would feel better explicitly telling the compiler what I needed. > > It is all too easy for bugs to slip in otherwise, especially when the > > gcc guys are adding exciting new optimizations. > > GCC guys (as opposed to the language guys) should be far more amenable > to our needs, and I don't think they want to break the kernel any more > than we do. Some are, some aren't. We should of course cherish the ones who would like to avoid breaking the kernel. Thanx, Paul