From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbbFRJkY (ORCPT ); Thu, 18 Jun 2015 05:40:24 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34546 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753369AbbFRJkU (ORCPT ); Thu, 18 Jun 2015 05:40:20 -0400 Date: Thu, 18 Jun 2015 11:40:14 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: "Paul E. McKenney" , 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: <20150618094014.GC1094@gmail.com> References: <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> <20150617154926.GE19282@twins.programming.kicks-ass.net> <20150617163731.GD3913@linux.vnet.ibm.com> <20150617171140.GG19282@twins.programming.kicks-ass.net> <20150617180214.GJ3913@linux.vnet.ibm.com> <20150618091505.GI19282@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150618091505.GI19282@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 * Peter Zijlstra wrote: > > > I doubt there's a single OS kernel (that supports SMP configurations) that > > > does not rely on a whole host of 'undefined' behaviour. > > > > An alternative approach would be a compiler switch (or similar) that changed > > the default atomic access from SC to relaxed. Then shared variables could be > > marked atomic, and normal C code could be used to access them, but without the > > compiler emitting memory barriers all over the place (yes, even on x86). > > See, I don;'t think that is a realistic approach. Who is going to audit our ~16 > million lines of code to mark all shared variables? Or all the other existing > code bases that rely on this behaviour? Sidenote: we are well beyond 19 million lines meanwhile. But generating speculative writes unless the compiler can prove it's not shared memory are crazy. Who on earth argues they are sane? In what retarded use-case do unasked for speculative writes even make any sense beyond as a sadistic tool to make parallel, threaded code even more fragile?? Thanks, Ingo