From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by kanga.kvack.org (Postfix) with ESMTP id A13246B0186 for ; Thu, 7 Nov 2013 20:16:40 -0500 (EST) Received: by mail-pb0-f48.google.com with SMTP id mc8so1388606pbc.7 for ; Thu, 07 Nov 2013 17:16:40 -0800 (PST) Received: from psmtp.com ([74.125.245.176]) by mx.google.com with SMTP id pz2si4823204pac.173.2013.11.07.17.16.38 for ; Thu, 07 Nov 2013 17:16:39 -0800 (PST) Subject: Re: [PATCH v3 3/5] MCS Lock: Barrier corrections From: Tim Chen In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Date: Thu, 07 Nov 2013 17:16:32 -0800 Message-ID: <1383873392.11046.402.camel@schen9-DESK> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michel Lespinasse Cc: Peter Zijlstra , 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, 2013-11-07 at 14:43 -0800, Michel Lespinasse wrote: > 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... > With the load_acquire and store_release implemented, it should be pretty straightforward to implement MCS with them. I'll respin the patch series with these primitives. Thanks. Tim -- 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