From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qe0-f44.google.com (mail-qe0-f44.google.com [209.85.128.44]) by kanga.kvack.org (Postfix) with ESMTP id CD3C66B00B4 for ; Mon, 25 Nov 2013 07:09:40 -0500 (EST) Received: by mail-qe0-f44.google.com with SMTP id nd7so3138149qeb.3 for ; Mon, 25 Nov 2013 04:09:40 -0800 (PST) Received: from merlin.infradead.org (merlin.infradead.org. [2001:4978:20e::2]) by mx.google.com with ESMTPS id n2si7594532qac.32.2013.11.25.04.09.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2013 04:09:40 -0800 (PST) Date: Mon, 25 Nov 2013 13:09:02 +0100 From: Peter Zijlstra Subject: Re: [PATCH v6 4/5] MCS Lock: Barrier corrections Message-ID: <20131125120902.GY10022@twins.programming.kicks-ass.net> References: <20131122203738.GC4138@linux.vnet.ibm.com> <20131122215208.GD4138@linux.vnet.ibm.com> <20131123002542.GF4138@linux.vnet.ibm.com> <20131123013654.GG4138@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Paul McKenney , Ingo Molnar , Tim Chen , Will Deacon , Ingo Molnar , Andrew Morton , Thomas Gleixner , "linux-kernel@vger.kernel.org" , linux-mm , "linux-arch@vger.kernel.org" , Waiman Long , Andrea Arcangeli , Alex Shi , Andi Kleen , Michel Lespinasse , Davidlohr Bueso , Matthew R Wilcox , Dave Hansen , Rik van Riel , Peter Hurley , Raghavendra K T , George Spelvin , "H. Peter Anvin" , Arnd Bergmann , Aswin Chandramouleeswaran , Scott J Norton , "Figo.zhang" On Sat, Nov 23, 2013 at 12:39:53PM -0800, Linus Torvalds wrote: > On Sat, Nov 23, 2013 at 12:21 PM, Linus Torvalds > wrote: > > > > And as far as I can tell, the above gives you: A < B < C < D < E < F < > > A. Which doesn't look possible. > > Hmm.. I guess technically all of those cases aren't "strictly > precedes" as much as "cannot have happened in the opposite order". So > the "<" might be "<=". Which I guess *is* possible: "it all happened > at the same time". And then the difference between your suggested > "lwsync" and "sync" in the unlock path on CPU0 basically approximating > the difference between "A <= B" and "A < B".. > > Ho humm. But remember, there's an actual full proper barrier between E and F, so at best you'd end up with something like: A <= B <= C <= D <= E < F <= A Which is still an impossibility. I'm hoping others will explain things, as I'm very much on shaky ground myself wrt transitivity. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org