From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 721E91A02EA for ; Tue, 26 Jan 2016 21:19:47 +1100 (AEDT) Date: Tue, 26 Jan 2016 11:19:27 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Will Deacon , Leonid Yegoshin , "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Arnd Bergmann , linux-arch@vger.kernel.org, Andrew Cooper , Russell King - ARM Linux , virtualization@lists.linux-foundation.org, Stefano Stabellini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Joe Perches , David Miller , linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, x86@kernel.org, user-mode-linux-devel@lists.sourceforge.net, adi-buildroot-devel@lists.sourceforge.net, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, xen-devel@lists.xenproject.org, Ralf Baechle , Ingo Molnar , ddaney.cavm@gmail.com, james.hogan@imgtec.com, Michael Ellerman Subject: Re: [v3,11/41] mips: reuse asm-generic/barrier.h Message-ID: <20160126101927.GD6357@twins.programming.kicks-ass.net> References: <20160114203430.GC3818@linux.vnet.ibm.com> <56980C91.1010403@imgtec.com> <20160114212913.GF3818@linux.vnet.ibm.com> <20160115085554.GF3421@worktop> <20160115091348.GA27936@worktop> <20160115174612.GV3818@linux.vnet.ibm.com> <20160115212714.GM3421@worktop> <20160115215853.GC3818@linux.vnet.ibm.com> <20160125164242.GF22927@arm.com> <20160126060322.GJ4503@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20160126060322.GJ4503@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Jan 25, 2016 at 10:03:22PM -0800, Paul E. McKenney wrote: > On Mon, Jan 25, 2016 at 04:42:43PM +0000, Will Deacon wrote: > > On Fri, Jan 15, 2016 at 01:58:53PM -0800, Paul E. McKenney wrote: > > > On Fri, Jan 15, 2016 at 10:27:14PM +0100, Peter Zijlstra wrote: > > > > Yes, that seems a good start. But yesterday you raised the 'fun' point > > > > of two globally ordered sequences connected by a single local link. > > > > > > The conclusion that I am slowly coming to is that litmus tests should > > > not be thought of as linear chains, but rather as cycles. If you think > > > of it as a cycle, then it doesn't matter where the local link is, just > > > how many of them and how they are connected. > > > > Do you have some examples of this? I'm struggling to make it work in my > > mind, or are you talking specifically in the context of the kernel > > memory model? > > Now that you mention it, maybe it would be best to keep the transitive > and non-transitive separate for the time being anyway. Just because it > might be possible to deal with does not necessarily mean that we should > be encouraging it. ;-) So isn't smp_mb__after_unlock_lock() exactly such a scenario? And would not someone trying to implement RCsc locks using locally transitive RELEASE/ACQUIRE operations need exactly this stuff? That is, I am afraid we need to cover the mix of local and global transitive operations at least in overview.