Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932066AbVLTT6H (ORCPT ); Tue, 20 Dec 2005 14:58:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932068AbVLTT6H (ORCPT ); Tue, 20 Dec 2005 14:58:07 -0500 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:24330 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id S932066AbVLTT6F (ORCPT ); Tue, 20 Dec 2005 14:58:05 -0500 Date: Tue, 20 Dec 2005 19:57:47 +0000 From: Russell King To: Steven Rostedt Cc: Nicolas Pitre , Nick Piggin , Ingo Molnar , David Woodhouse , Zwane Mwaikambo , lkml , Linus Torvalds , Andrew Morton , Arjan van de Ven , Alan Cox , Christoph Hellwig , Andi Kleen , David Howells , Alexander Viro , Oleg Nesterov , Paul Jackson Subject: Re: [patch 04/15] Generic Mutex Subsystem, add-atomic-call-func-x86_64.patch Message-ID: <20051220195747.GE24199@flint.arm.linux.org.uk> Mail-Followup-To: Steven Rostedt , Nicolas Pitre , Nick Piggin , Ingo Molnar , David Woodhouse , Zwane Mwaikambo , lkml , Linus Torvalds , Andrew Morton , Arjan van de Ven , Alan Cox , Christoph Hellwig , Andi Kleen , David Howells , Alexander Viro , Oleg Nesterov , Paul Jackson References: <20051220043109.GC32039@elte.hu> <43A7BCE1.7050401@yahoo.com.au> <43A81132.8040703@yahoo.com.au> <43A81DD4.30906@yahoo.com.au> <20051220192018.GB24199@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 33 On Tue, Dec 20, 2005 at 02:43:30PM -0500, Steven Rostedt wrote: > So what's wrong with having the generic code, and for those with a fast > semapore add an arch specific? > > #define mutex_lock down > #define mutex_unlock up > #define mutex_trylock(x) (!down_trylock(x)) > > Until the mutex code is updated to a fast arch specific implementation. > > Let me restate, that the generic code should not be this, but each arch > can have this if they already went through great lengths in making a fast > semaphore. I have no problem with this since we can then use Nico's swp-based implementation. Great! What seems to be happening though is that there's a move to make these operations be generic across all architectures. What both Nico and myself have demonstrated is that if architectures are placed into the generic strait-jacket, any alleged performance benefit of mutexes is completely swamped, which in turn makes the whole mutex idea entirely pointless. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core - 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/