From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936969Ab3DJKbw (ORCPT ); Wed, 10 Apr 2013 06:31:52 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:33010 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499Ab3DJKbt (ORCPT ); Wed, 10 Apr 2013 06:31:49 -0400 Date: Wed, 10 Apr 2013 12:31:44 +0200 From: Ingo Molnar To: Waiman Long Cc: Linus Torvalds , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "Paul E. McKenney" , David Howells , Dave Jones , Clark Williams , Peter Zijlstra , Davidlohr Bueso , Linux Kernel Mailing List , "Chandramouleeswaran, Aswin" , Peter Zijlstra , Andrew Morton , "Norton, Scott J" , Rik van Riel Subject: Re: [PATCH RFC 1/3] mutex: Make more scalable by doing less atomic operations Message-ID: <20130410103144.GC28505@gmail.com> References: <1365087258-7169-1-git-send-email-Waiman.Long@hp.com> <1365087258-7169-2-git-send-email-Waiman.Long@hp.com> <20130408124223.GA10093@gmail.com> <5163042F.9000404@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5163042F.9000404@hp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Waiman Long wrote: > > That said, the MUTEX_SHOULD_XCHG_COUNT macro should die. Why shouldn't all > > architectures just consider negative counts to be locked? It doesn't matter > > that some might only ever see -1. > > I think so too. However, I don't have the machines to test out other > architectures. The MUTEX_SHOULD_XCHG_COUNT is just a safety measure to make sure > that my code won't screw up the kernel in other architectures. Once it is > confirmed that a negative count other than -1 is fine for all the other > architectures, the macro can certainly go. I'd suggest to just remove it in an additional patch, Cc:-ing linux-arch@vger.kernel.org. The change is very likely to be fine, if not then it's easy to revert it. Thanks, Ingo