Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbaFJPSR (ORCPT ); Tue, 10 Jun 2014 11:18:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13904 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbaFJPSP (ORCPT ); Tue, 10 Jun 2014 11:18:15 -0400 Date: Tue, 10 Jun 2014 17:17:35 +0200 From: Jakub Jelinek To: Peter Zijlstra Cc: Marek Polacek , Jiri Kosina , Linus Torvalds , "Paul E. McKenney" , Andrew Morton , Martin Jambor , Petr Mladek , linux-kernel@vger.kernel.org, gcc@gcc.gnu.org Subject: Re: [PATCH] tell gcc optimizer to never introduce new data races Message-ID: <20140610151735.GH19001@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20140610145327.GJ6758@twins.programming.kicks-ass.net> <20140610150455.GC7335@redhat.com> <20140610151329.GL6758@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140610151329.GL6758@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 10, 2014 at 05:13:29PM +0200, Peter Zijlstra wrote: > On Tue, Jun 10, 2014 at 05:04:55PM +0200, Marek Polacek wrote: > > On Tue, Jun 10, 2014 at 04:53:27PM +0200, Peter Zijlstra wrote: > > > On Tue, Jun 10, 2014 at 03:23:36PM +0200, Jiri Kosina wrote: > > > > +# Tell gcc to never replace conditional load with a non-conditional one > > > > +KBUILD_CFLAGS += $(call cc-option,--param allow-store-data-races=0) > > > > + > > > > > > Why do we not want: -fmemory-model=safe? And should we not at the very > > > least also disable packed-store-data-races? > > > > Note that the option does not exist, even though it is mentioned in the > > documentation. > > Urgh.. ok. Any word on the packed-store-data thing? That is recognized, undocumented and never used in the compiler (not in 4.7 or any later release till now). Most of the spots in the compiler that could introduce data races were actually just changed, there is (already since 4.7) just a single conditional on the --param allow-store-data-races=X value. Jakub -- 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/