From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965125AbVLNXvF (ORCPT ); Wed, 14 Dec 2005 18:51:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965124AbVLNXvE (ORCPT ); Wed, 14 Dec 2005 18:51:04 -0500 Received: from 213-239-205-147.clients.your-server.de ([213.239.205.147]:25784 "EHLO mail.tglx.de") by vger.kernel.org with ESMTP id S965121AbVLNXvC (ORCPT ); Wed, 14 Dec 2005 18:51:02 -0500 Subject: Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation From: Thomas Gleixner Reply-To: tglx@linutronix.de To: Mark Lord Cc: David Howells , Alan Cox , Paul Jackson , mingo@elte.hu, hch@infradead.org, akpm@osdl.org, torvalds@osdl.org, arjan@infradead.org, matthew@wil.cx, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org In-Reply-To: <43A0AD54.6050109@rtr.ca> References: <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> Content-Type: text/plain Organization: linutronix Date: Thu, 15 Dec 2005 00:57:47 +0100 Message-Id: <1134604667.2542.86.camel@tglx.tec.linutronix.de> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2005-12-14 at 18:40 -0500, Mark Lord wrote: > Thomas Gleixner wrote: > > > > You can do a full scripted rename of up/down to the mutex API and then > > fix up the 100 places used by semaphores manually. > > Again, folks, this only works for current in-tree kernel code. > > There are huge amounts of kernel code out-of-tree that still use > up/down as (or potentially as) counting semaphores. > > Yes, some of that code is closed-source, but most of it is open-source > stuff in people's "queues", such as the network patch-o-matic queue > and other stuff. Lots of open-source out-of-tree drivers, too. > > Re-using the existing up()/down() names for a new purpose is > a very very Bad Idea. Ack. > Removing up()/down() entirely is not quite so bad, > because at least then people will eventually notice the change. > > Leaving up()/down() as-is is really the most sensible option. Not at all. Doing a s/down/lock_mutex/ s/up/unlock_mutex/ - or whatever naming convention we want to use - all over the place for mutexes while keeping the up/down for counting semaphores is an one time issue. After the conversion every code breaks at compile time which tries to do up/down(mutex_type). So the out of tree drivers have a clear indication what to fix. This is also a one time issue. So where is the problem - except for fixing "huge" amounts of out of kernel code once ? tglx