Re: [uClinux-dev] Kernel 2.6 size increase - get_current()?

Ihar "Philips" Filipau
2003-07-24T08:12:35Z

David McCullough wrote:
>
> A general comment on the use of inline throughout the kernel. Although
> they may show gains on x86 platforms, they often perform worse on
> embedded processors with limited cache, as well as adding size. I
> can't see any way of coding around this though. As long as x86 is
> driving influence, other platforms will jut have to deal with it as
> best they can.
>

Actually I'm victim on over inlining too. Was at least.
I was running some router on old Pentium's. I remember almost
dramatical drop of performance with newer kernels because of inlining in
net/*. But sure on Xeon P4 it boosts performance...

Actually what I'm about.
We have classical situation when we have mess of representation and
intentions.

Representation == 'inline', but intentions - 'inline or it will
break' _and_ 'inline - it runs faster'.
This obviously should be separated.

even more.

#define INLINE_LEVEL some_platform_specific_number

---------

#define inline0 inline_always

#if INLINE_LEVEL >= 1
# define inline1 inline_always
#else
# define inline1
#endif
...
#if INLINE_LEVEL >= N
# define inlineN inline_always
#else
# define inlineN
#endif

and so on, giving a platform chance to influence amount of inlining.
better to put it into config with defined by platform defaults.