Subject: Re: Nuking mbuf macros
To: None <tech-kern@NetBSD.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 03/22/2004 22:44:40
At 10:16 PM 3/22/2004, der Mouse wrote:
> >> The attached patch turns mbuf macros into wrappers to real
> >> functions.  With the patch applied GENERIC/i386 kernel is 37KB
> >> smaller.
>
> >> From commit log of the same change made in DragonFly BSD:
>(non-break-spaces converted to regular spaces and rewrapped -dM]
> >>  Nuke huge mbuf macros stage 1/2: Remove massive inline mbuf macros
> >>  to reduce L1/L2 cache pollution.  Est. performance improvement of
> >>  4-6% and the kernel is 42KB smaller.
> > did DragonFly folks measure function call overhead due to the change?
> > (overall performance improvement of 4-6% it sounds good, but just to
> > make sure)
>
>Note the 4-6% figure is _estimated_.  If it were me deciding whether
>this went in (which of course it isn't), I'd want to see measured
>numbers for the performance difference.
>
>Also, it occurs to me that this is likely to be a performance _lose_ on
>some machines - but, on the third hand, a win for cases (like
>installation kernels) where space is mroe important than speed.  Maybe
>it should be a config-time option?

Translating them to inline functions wouldn't bother me much.
On some architectures the call overhead can be quite high (VAX).

But I want to see performance numbers for a number of architectures
including some of the older ones like m68k, vax, alpha.

-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.