From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [RFC][PATCH 0/7] locking: qspinlock Date: Tue, 11 Mar 2014 12:04:47 +0100 Message-ID: <20140311110447.GA27009@gmail.com> References: <20140310154236.038181843@infradead.org> <20140311104503.GA10916@gmail.com> <20140311110202.GT27965@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-ea0-f174.google.com ([209.85.215.174]:59817 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbaCKLEw (ORCPT ); Tue, 11 Mar 2014 07:04:52 -0400 Content-Disposition: inline In-Reply-To: <20140311110202.GT27965@twins.programming.kicks-ass.net> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Peter Zijlstra Cc: Waiman Long , arnd@arndb.de, linux-arch@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, akpm@linux-foundation.org, walken@google.com, andi@firstfloor.org, riel@redhat.com, paulmck@linux.vnet.ibm.com, torvalds@linux-foundation.org, oleg@redhat.com * Peter Zijlstra wrote: > On Tue, Mar 11, 2014 at 11:45:03AM +0100, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > > > Hi Waiman, > > > > > > I promised you this series a number of days ago; sorry for the delay > > > I've been somewhat unwell :/ > > > > > > That said, these few patches start with a (hopefully) simple and > > > correct form of the queue spinlock, and then gradually build upon > > > it, explaining each optimization as we go. > > > > > > Having these optimizations as separate patches helps twofold; > > > firstly it makes one aware of which exact optimizations were done, > > > and secondly it allows one to proove or disprove any one step; > > > seeing how they should be mostly identity transforms. > > > > > > The resulting code is near to what you posted I think; however it > > > has one atomic op less in the pending wait-acquire case for NR_CPUS > > > != huge. It also doesn't do lock stealing; its still perfectly fair > > > afaict. > > > > > > Have I missed any tricks from your code? > > > > Waiman, you indicated in the other thread that these look good to > > you, right? If so then I can queue them up so that they form a > > base for further work. > > Ah, no that was on the qrwlock; I think we managed to cross wires > somewhere. Oops, too many q-locks ;-) > I've got this entire pile waiting for something: > > lkml.kernel.org/r/20140210195820.834693028@infradead.org > > That's 5 mutex patches and the 2 qrwlock patches. Not sure what to > do with them. To merge or not, that is the question. Can merge them in tip:core/locking if there's no objections. Thanks, Ingo