Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965138AbWH2Q5u (ORCPT ); Tue, 29 Aug 2006 12:57:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965123AbWH2Q5t (ORCPT ); Tue, 29 Aug 2006 12:57:49 -0400 Received: from mx1.redhat.com ([66.187.233.31]:25000 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S965138AbWH2Q5s (ORCPT ); Tue, 29 Aug 2006 12:57:48 -0400 From: David Howells In-Reply-To: References: <20060829162055.GA31159@linux-mips.org> <44F395DE.10804@yahoo.com.au> <1156750249.3034.155.camel@laptopd505.fenrus.org> <11861.1156845927@warthog.cambridge.redhat.com> <5878.1156868702@warthog.cambridge.redhat.com> To: Christoph Lameter Cc: David Howells , Ralf Baechle , Nick Piggin , Arjan van de Ven , Dong Feng , ak@suse.de, Paul Mackerras , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: Why Semaphore Hardware-Dependent? X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.0.50 Date: Tue, 29 Aug 2006 17:57:36 +0100 Message-ID: <21013.1156870656@warthog.cambridge.redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 24 Christoph Lameter wrote: > > Some of these have LL/SC or equivalent instead, but ARM5 and before, FRV, > > M68K before 68020 to name but a few. > > This is all pretty ancient hardware, right? And they are mostly single > processor so no need to worry about concurrency. Just disable interrupts. No, they're not all ancient h/w, and "just disabling interrupts" can be really expensive. > > And anything that implements CMPXCHG with spinlocks is a really bad > > candidate for CMPXCHG-based rwsems. > > Those will optimize out if it is a single processor configuration. Not necessarily. Consider preemption. David - 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/