From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: David Howells In-Reply-To: <20051215121817.2abb0166.akpm@osdl.org> References: <20051215121817.2abb0166.akpm@osdl.org> <20051214155432.320f2950.akpm@osdl.org> <1134559121.25663.14.camel@localhost.localdomain> <13820.1134558138@warthog.cambridge.redhat.com> <20051213143147.d2a57fb3.pj@sgi.com> <20051213094053.33284360.pj@sgi.com> <20051212161944.3185a3f9.akpm@osdl.org> <20051213075441.GB6765@elte.hu> <20051213090219.GA27857@infradead.org> <20051213093949.GC26097@elte.hu> <20051213100015.GA32194@elte.hu> <6281.1134498864@warthog.cambridge.redhat.com> <14242.1134558772@warthog.cambridge.redhat.com> <16315.1134563707@warthog.cambridge.redhat.com> <1134568731.4275.4.camel@tglx.tec.linutronix.de> <43A0AD54.6050109@rtr.ca> <4336.1134661053@warthog.cambridge.redhat.com> <20051215112855.31669dc1.akpm@osdl.org> Subject: Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation Date: Fri, 16 Dec 2005 10:45:58 +0000 Message-ID: <10838.1134729958@warthog.cambridge.redhat.com> Sender: dhowells@redhat.com To: Andrew Morton Cc: dhowells@redhat.com, lkml@rtr.ca, tglx@linutronix.de, alan@lxorguk.ukuu.org.uk, pj@sgi.com, mingo@elte.hu, hch@infradead.org, torvalds@osdl.org, arjan@infradead.org, matthew@wil.cx, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-ID: Andrew Morton wrote: > Look at it from the POV of major architectures: there's no way the new > mutex code will be faster than down() and up() I'm thinking of making the default implementation of mutexes a straight wrapper around down() and up(). That way it'll be exactly the same as counting semaphores, just with extra constraints when the debugging is enabled _and_ effectively extra inline documentation. But! for archs where it does matter (and we have several - you might not care, but others do), it can be overridden with something faster. David