Subject: Re: Proposal: eliminate all macros in the kernel
To: David Laight <email@example.com>
From: Thor Lancelot Simon <firstname.lastname@example.org>
Date: 11/20/2005 15:47:42
On Sun, Nov 20, 2005 at 08:01:26PM +0000, David Laight wrote:
> On Sun, Nov 20, 2005 at 12:09:27PM -0500, Thor Lancelot Simon wrote:
> > I propose that we replace all macros in our kernel with inline functions.
> > This will clean up the mess while at the same time making it easier to
> > decide whether some of this code should be inlined at all.
> In many cases you really don't want inline functions either.
> Inlining code can have a large negative performance due to the way
> that it interacts rather badly with the instruction cache.
I think we're very much in agreement about this. Just to be clear, I am
suggesting that we *first* move from macros to inline functions -- a
change that is primarily syntactic, which should have little or no impact
on performance but improve readability and maintainability of code, *then*
carefully consider which of those functions should be inline at all: any
resulting changes at that point should be much simpler to make because
the macros will have already been converted to function form.