Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755435Ab3JXONN (ORCPT ); Thu, 24 Oct 2013 10:13:13 -0400 Received: from g6t0186.atlanta.hp.com ([15.193.32.63]:42004 "EHLO g6t0186.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755118Ab3JXONL (ORCPT ); Thu, 24 Oct 2013 10:13:11 -0400 Message-ID: <52692AE7.3060701@hp.com> Date: Thu, 24 Oct 2013 10:12:55 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Thomas Gleixner 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 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 40 On 10/24/2013 06:14 AM, Thomas Gleixner wrote: > 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 > There is an outstanding rwsem patch series that is doing the unification. I am waiting for that patch series to be at least in a tip or linux-next branch before doing the unification. Otherwise, it will cause merge conflict. -Longman -- 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/