From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755783Ab3KHBQj (ORCPT ); Thu, 7 Nov 2013 20:16:39 -0500 Received: from mga09.intel.com ([134.134.136.24]:12530 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753584Ab3KHBQh (ORCPT ); Thu, 7 Nov 2013 20:16:37 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,535,1378882800"; d="scan'208";a="405356968" Subject: Re: [PATCH v3 3/5] MCS Lock: Barrier corrections From: Tim Chen 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 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 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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