Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754649Ab3JXKPQ (ORCPT ); Thu, 24 Oct 2013 06:15:16 -0400 Received: from www.linutronix.de ([62.245.132.108]:35215 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754449Ab3JXKPN (ORCPT ); Thu, 24 Oct 2013 06:15:13 -0400 Date: Thu, 24 Oct 2013 12:14:58 +0200 (CEST) From: Thomas Gleixner To: Waiman Long cc: walken@google.com, Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann , linux-arch@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Andrew Morton , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Linus Torvalds , Raghavendra K T , George Spelvin , Tim Chen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Subject: Re: [PATCH v4 1/3] qrwlock: A queue read/write lock implementation In-Reply-To: <52680022.1020200@hp.com> Message-ID: References: <1380722946-30468-1-git-send-email-Waiman.Long@hp.com> <1380722946-30468-2-git-send-email-Waiman.Long@hp.com> <20131023120004.GD2862@localhost> <52680022.1020200@hp.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1128 Lines: 34 On Wed, 23 Oct 2013, Waiman Long wrote: > On 10/23/2013 08:00 AM, walken@google.com wrote: > > > + /* > > > + * Wait until the next one in queue set up the next field > > > + */ > > > + while (likely(!(next = ACCESS_ONCE(node->next)))) > > > + cpu_relax(); > > > + /* > > > + * The next one in queue is now at the head > > > + */ > > > +notify_next: > > > + barrier(); > > > + ACCESS_ONCE(next->wait) = false; > > > + smp_wmb(); > > > +} > > I believe this could be unified with mspin_lock() / mspin_unlock() in > > kernel/mutex.c ? (there is already talk of extending these functions > > to be used by rwsem for adaptive spinning as well...) > > It probably can, but the unification can wait until the code are in. The unification has to be done as a part of this series. Cleanups are part of the development process of new code and not an optional feature. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/