From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by kanga.kvack.org (Postfix) with ESMTP id 179C16B0031 for ; Fri, 22 Nov 2013 15:09:33 -0500 (EST) Received: by mail-ve0-f181.google.com with SMTP id oy12so1256209veb.40 for ; Fri, 22 Nov 2013 12:09:32 -0800 (PST) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id dl10si13126663veb.57.2013.11.22.12.09.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Nov 2013 12:09:32 -0800 (PST) Received: by mail-ve0-f174.google.com with SMTP id pa12so1265604veb.19 for ; Fri, 22 Nov 2013 12:09:31 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20131122200620.GA4138@linux.vnet.ibm.com> References: <20131121045333.GO4138@linux.vnet.ibm.com> <20131121225208.GJ4138@linux.vnet.ibm.com> <20131122040856.GK4138@linux.vnet.ibm.com> <20131122062314.GN4138@linux.vnet.ibm.com> <20131122151600.GA14988@gmail.com> <20131122184937.GX4138@linux.vnet.ibm.com> <20131122200620.GA4138@linux.vnet.ibm.com> Date: Fri, 22 Nov 2013 12:09:31 -0800 Message-ID: Subject: Re: [PATCH v6 4/5] MCS Lock: Barrier corrections From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Paul McKenney Cc: 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 , Peter Zijlstra , Rik van Riel , Peter Hurley , Raghavendra K T , George Spelvin , "H. Peter Anvin" , Arnd Bergmann , Aswin Chandramouleeswaran , Scott J Norton , "Figo.zhang" On Fri, Nov 22, 2013 at 12:06 PM, Paul E. McKenney wrote: > > I am sorry, but that is not always correct. For example, in the contended > case for Tim Chen's MCS queued locks, the x86 acquisition-side handoff > code does -not- contain any stores or memory-barrier instructions. So? In order to get *into* that contention code, you will have to go through the fast-case code. Which will contain a locked instruction. So I repeat: a "lock" sequence will always be a memory barrier on x86. Linus -- 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