From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: Re: [PATCH v2 optional 3/3] mutex: back out architecture specific check for negative mutex count Date: Tue, 16 Apr 2013 08:10:53 -0400 Message-ID: <516D3FCD.9060703@hp.com> References: <1366036679-9702-1-git-send-email-Waiman.Long@hp.com> <1366036679-9702-4-git-send-email-Waiman.Long@hp.com> <20130416100505.GD31156@mudshark.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:46362 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755221Ab3DPMK4 (ORCPT ); Tue, 16 Apr 2013 08:10:56 -0400 In-Reply-To: <20130416100505.GD31156@mudshark.cambridge.arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Will Deacon Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "Paul E. McKenney" , David Howells , Dave Jones , Clark Williams , Peter Zijlstra , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-arch@vger.kernel.org" , "Chandramouleeswaran, Aswin" , Davidlohr Bueso , "Norton, Scott J" , Rik van Riel On 04/16/2013 06:05 AM, Will Deacon wrote: > On Mon, Apr 15, 2013 at 03:37:59PM +0100, Waiman Long wrote: >> If it is confirmed that all the supported architectures can allow a >> negative mutex count without incorrect behavior, we can then back >> out the architecture specific change and allow the mutex count to >> go to any negative number. That should further reduce contention for >> non-x86 architecture. >> >> If this is not the case, this patch should be dropped. > A good starting point might be to look at the asm-generic mutex > implementations, which clears up the majority of architectures. A cursory > glance at mutex-dec.h suggests that it's OK to me... I think the generic version is fine with negative mutex count. However, it is the architecture specific versions (we have 22 of them as of 3.8) that I am worry about. I just don't have enough know-how and test machines to verify that. Regards, Longman