From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qe0-f49.google.com (mail-qe0-f49.google.com [209.85.128.49]) by kanga.kvack.org (Postfix) with ESMTP id 66C0F6B0037 for ; Mon, 25 Nov 2013 18:53:01 -0500 (EST) Received: by mail-qe0-f49.google.com with SMTP id w7so4748838qeb.8 for ; Mon, 25 Nov 2013 15:53:01 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com. [32.97.110.151]) by mx.google.com with ESMTPS id p4si33513158qey.140.2013.11.25.15.53.00 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Nov 2013 15:53:00 -0800 (PST) Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 25 Nov 2013 16:52:59 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id C0E353E40026 for ; Mon, 25 Nov 2013 16:52:57 -0700 (MST) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by b03cxnp08027.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rAPLp9Hx44368024 for ; Mon, 25 Nov 2013 22:51:09 +0100 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id rAPNtpZt025612 for ; Mon, 25 Nov 2013 16:55:53 -0700 Date: Mon, 25 Nov 2013 15:52:52 -0800 From: "Paul E. McKenney" Subject: Re: [PATCH v6 4/5] MCS Lock: Barrier corrections Message-ID: <20131125235252.GA4138@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20131121132041.GS4138@linux.vnet.ibm.com> <20131121172558.GA27927@linux.vnet.ibm.com> <20131121215249.GZ16796@laptop.programming.kicks-ass.net> <20131121221859.GH4138@linux.vnet.ibm.com> <20131122155835.GR3866@twins.programming.kicks-ass.net> <20131122182632.GW4138@linux.vnet.ibm.com> <20131122185107.GJ4971@laptop.programming.kicks-ass.net> <20131125173540.GK3694@twins.programming.kicks-ass.net> <20131125180250.GR4138@linux.vnet.ibm.com> <20131125182715.GG10022@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131125182715.GG10022@twins.programming.kicks-ass.net> Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra Cc: Will Deacon , Tim Chen , Ingo Molnar , Andrew Morton , Thomas Gleixner , "linux-kernel@vger.kernel.org" , linux-mm , "linux-arch@vger.kernel.org" , Linus Torvalds , 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 Mon, Nov 25, 2013 at 07:27:15PM +0100, Peter Zijlstra wrote: > On Mon, Nov 25, 2013 at 10:02:50AM -0800, Paul E. McKenney wrote: > > And if the two locks are different, then the guarantee applies only > > when the unlock and lock are on the same CPU, in which case, as Linus > > noted, the xchg() on entry to the slow path does the job for use. > > But in that case we rely on the fact that the thing is part of a > composite and we should no longer call it load_acquire, because frankly > it doesn't have acquire semantics anymore because the read can escape > out. Actually, load-acquire and store-release are only required to provide ordering in the threads/CPUs doing the load-acquire/store-release operations. It is just that we require something stronger than minimal load-acquire/store-release to make a Linux-kernel lock. Thanx, Paul -- 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