From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by kanga.kvack.org (Postfix) with ESMTP id 6752C6B0184 for ; Thu, 7 Nov 2013 17:43:54 -0500 (EST) Received: by mail-pd0-f179.google.com with SMTP id y10so1243837pdj.38 for ; Thu, 07 Nov 2013 14:43:54 -0800 (PST) Received: from psmtp.com ([74.125.245.118]) by mx.google.com with SMTP id gw3si4465146pac.172.2013.11.07.14.43.51 for ; Thu, 07 Nov 2013 14:43:52 -0800 (PST) Received: by mail-qe0-f53.google.com with SMTP id cy11so1173068qeb.40 for ; Thu, 07 Nov 2013 14:43:49 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20131107222144.GC19203@twins.programming.kicks-ass.net> References: <1383773827.11046.355.camel@schen9-DESK> <20131107143139.GT18245@linux.vnet.ibm.com> <1383858951.11046.399.camel@schen9-DESK> <20131107222144.GC19203@twins.programming.kicks-ass.net> Date: Thu, 7 Nov 2013 14:43:49 -0800 Message-ID: Subject: Re: [PATCH v3 3/5] MCS Lock: Barrier corrections From: Michel Lespinasse Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra Cc: Tim Chen , Paul McKenney , Linus Torvalds , Waiman Long , Arnd Bergmann , Rik van Riel , Aswin Chandramouleeswaran , Raghavendra K T , "Figo. zhang" , linux-arch@vger.kernel.org, Andi Kleen , George Spelvin , Ingo Molnar , Peter Hurley , "H. Peter Anvin" , Andrew Morton , linux-mm , Andrea Arcangeli , Alex Shi , LKML , Scott J Norton , Thomas Gleixner , Dave Hansen , Matthew R Wilcox , Will Deacon , Davidlohr Bueso On Thu, Nov 7, 2013 at 2:21 PM, Peter Zijlstra wrote: > On Thu, Nov 07, 2013 at 01:15:51PM -0800, Tim Chen wrote: >> Michel, are you planning to do an implementation of >> load-acquire/store-release functions of various architectures? > > A little something like this: > http://marc.info/?l=linux-arch&m=138386254111507 > > It so happens we were working on that the past week or so due to another > issue ;-) Haha, awesome, I wasn't aware of this effort. Tim: my approach would be to provide the acquire/release operations in arch-specific include files, and have a default implementation using barriers for arches who don't provide these new ops. That way you make it work on all arches at once (using the default implementation) and make it fast on any arch that cares. >> Or is the approach of arch specific memory barrier for MCS >> an acceptable one before load-acquire and store-release >> are available? Are there any technical issues remaining with >> the patchset after including including Waiman's arch specific barrier? I don't want to stand in the way of Waiman's change, and I had actually taken the same approach with arch-specific barriers when proposing some queue spinlocks in the past; however I do feel that this comes back regularly enough that having acquire/release primitives available would help, hence my proposal. That said, earlier in the thread Linus said we should probably get all our ducks in a row before going forward with this, so... -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- 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