Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932296AbVLNLCh (ORCPT ); Wed, 14 Dec 2005 06:02:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932283AbVLNLCg (ORCPT ); Wed, 14 Dec 2005 06:02:36 -0500 Received: from mx1.redhat.com ([66.187.233.31]:62173 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S932275AbVLNLCg (ORCPT ); Wed, 14 Dec 2005 06:02:36 -0500 From: David Howells In-Reply-To: <20051213143147.d2a57fb3.pj@sgi.com> References: <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> To: Paul Jackson Cc: David Howells , 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 Subject: Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation X-Mailer: MH-E 7.84; nmh 1.1; GNU Emacs 22.0.50.1 Date: Wed, 14 Dec 2005 11:02:18 +0000 Message-ID: <13820.1134558138@warthog.cambridge.redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1563 Lines: 41 Paul Jackson wrote: > The sed/perl script to make the textual change should be practical. > Indeed, I would claim that the initial big patch -should- be done > that way. Keep refining a sed script until manual inspection and > trial builds of all arch's, allconfig, show that it seems to be right. > Each time you find an error doing this, don't manually edit the > kernel source; rather refine the script and try applying it again. Actually, you may have a point. If the order of patches is: (1) Create new mutex as struct mutex/up_mutex/down_mutex, say. (2) Make counting semaphore implementation struct semaphore/up_sem/down_sem. (3) Convert uses of semaphores that should be completions into completions. (4) Convert uses of semaphores that should be counting semaphores to use up_sem/down_sem. (5) Mass convert by script all the remaining ups and downs into up_mutex and down_mutex. (6) Make wrappers for up/down that map to counting semaphores with the deprecation attribute set. That might work, and would be a lot easier; except for the humongous patch generated at step 5 - which could be regenerated by script. I think I can make a simple perl script to do that. Note that I am assuming above that down == down/down_trylock/down_interruptible for clarity. 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/