Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932668AbVLRBaF (ORCPT ); Sat, 17 Dec 2005 20:30:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932662AbVLRBaF (ORCPT ); Sat, 17 Dec 2005 20:30:05 -0500 Received: from relais.videotron.ca ([24.201.245.36]:33621 "EHLO relais.videotron.ca") by vger.kernel.org with ESMTP id S932660AbVLRBaB (ORCPT ); Sat, 17 Dec 2005 20:30:01 -0500 Date: Sat, 17 Dec 2005 20:29:58 -0500 (EST) From: Nicolas Pitre Subject: Re: [PATCH 1/12]: MUTEX: Implement mutexes In-reply-to: X-X-Sender: nico@localhost.localdomain To: Linus Torvalds Cc: David Howells , Steven Rostedt , linux-arch@vger.kernel.org, lkml , mingo@redhat.com, Andrew Morton Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT References: <200512162313.jBGND7g4019623@warthog.cambridge.redhat.com> <1134791914.13138.167.camel@localhost.localdomain> <14917.1134847311@warthog.cambridge.redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 23 On Sat, 17 Dec 2005, Linus Torvalds wrote: > Of the other architectures you list, only ARM is really important. And no, > arm doesn't do swap. It does LL/SC (except they call it "ldrex/strex", > which I assume stands for "load/store with reservation and X just because > X is cool. Yeah, we're cool" (*)). Well, if you really want to be honest, you have to consider that the ldrex/strex instructions are available only on ARM architecture level 6 and above, or in other words with only about 1% of all ARM deployments out there. The other 99% of actual ARM processors in the field only have the atomic swap (swp) instruction which is insufficient for implementing a counting semaphore (we therefore have to disable interrupts, do the semaphore update and enable interrupts again which is much slower than a swp-based mutex). Nicolas - 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/