From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v6 4/5] MCS Lock: Barrier corrections Date: Fri, 29 Nov 2013 18:18:17 +0000 Message-ID: <20131129181817.GL31000@mudshark.cambridge.arm.com> References: <20131127101613.GC9032@mudshark.cambridge.arm.com> <20131127171143.GN4137@linux.vnet.ibm.com> <20131128114058.GC21354@mudshark.cambridge.arm.com> <20131128173853.GV4137@linux.vnet.ibm.com> <20131128180318.GE16203@mudshark.cambridge.arm.com> <20131128182712.GW4137@linux.vnet.ibm.com> <20131128185341.GG16203@mudshark.cambridge.arm.com> <20131128195039.GX4137@linux.vnet.ibm.com> <20131129161711.GG31000@mudshark.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Linus Torvalds Cc: Arnd Bergmann , "Figo. zhang" , Aswin Chandramouleeswaran , Rik van Riel , Waiman Long , "linux-kernel@vger.kernel.org" , Raghavendra K T , "linux-arch@vger.kernel.org" , Andi Kleen , George Spelvin , Tim Chen , Michel Lespinasse , Ingo Molnar , "Paul E. McKenney" , Peter Hurley , "H. Peter Anvin" , Andrew Morton , linux-mm , Alex Shi , Andrea Arcangeli , Scott J Norton , Thomas Gleixner List-Id: linux-arch.vger.kernel.org On Fri, Nov 29, 2013 at 04:44:41PM +0000, Linus Torvalds wrote: > > On Nov 29, 2013 8:18 AM, "Will Deacon" > > wrote: > > > > To get some sort of idea, I tried adding a dmb to the start of > > spin_unlock on ARMv7 and I saw a 3% performance hit in hackbench on my > > dual-cluster board. > > Don't do a dmb. Just do a dummy release. You just said that on arm64 a > unlock+lock is a memory barrier, so just make the mb__before_spinlock() be > a dummy store with release to the stack.. Good idea! That should work quite nicely (I don't have anything sane I can benchmark it on), so I think that solves the issue I was moaning about. Will -- 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