From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756750AbbFQQ6U (ORCPT ); Wed, 17 Jun 2015 12:58:20 -0400 Received: from casper.infradead.org ([85.118.1.10]:33769 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755678AbbFQQ6J (ORCPT ); Wed, 17 Jun 2015 12:58:09 -0400 Date: Wed, 17 Jun 2015 18:58:02 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: umgwanakikbuti@gmail.com, mingo@elte.hu, ktkhai@parallels.com, rostedt@goodmis.org, tglx@linutronix.de, juri.lelli@gmail.com, pang.xunlei@linaro.org, oleg@redhat.com, wanpeng.li@linux.intel.com, linux-kernel@vger.kernel.org, Al Viro , Linus Torvalds Subject: Re: [PATCH 11/18] seqcount: Introduce raw_write_seqcount_barrier() Message-ID: <20150617165802.GF19282@twins.programming.kicks-ass.net> References: <20150611124636.448700267@infradead.org> <20150611124743.374180021@infradead.org> <20150611153341.GK3913@linux.vnet.ibm.com> <20150611214557.GA4249@linux.vnet.ibm.com> <20150617122924.GP3644@twins.programming.kicks-ass.net> <20150617145712.GZ3913@linux.vnet.ibm.com> <20150617151109.GD19282@twins.programming.kicks-ass.net> <20150617154245.GB3913@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150617154245.GB3913@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 17, 2015 at 08:42:45AM -0700, Paul E. McKenney wrote: > > I would very much prefer a compiler switch that instructs the compiler > > to not do bloody stupid things like this instead of marking every other > > load/store in the kernel with volatile. > > I would of course be good with such a compiler switch, though my earlier > attempts to negotiate one were unsuccessful. But I don't believe that we > discussed a switch to specifically prohibit only use of to-be-stored-into > variables as temporary scratch space. The trick is finding restrictions > that are useful, but that don't imply -O0. I would request on that disables all the 'stores from thin air' 'optimizations'. IOW assume everything is shared memory and concurrent unless you can prove its not so. For example a local stack variable that does not escape scope.