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

Ihar "Philips" Filipau
2003-07-24T07:57:55Z

Bernardo Innocenti wrote:
> On Wednesday 23 July 2003 22:27, Christoph Hellwig wrote:
>
>>On Wed, Jul 23, 2003 at 01:22:56PM -0700, David S. Miller wrote:
>>>Drivers weren't audited much, and there's a lot of boneheaded
>>>stuff in this area. But these should be mostly identical
>>>to what would happen on the 2.4.x side
>>
>>Please read the original message again - he stated that every single
>>module in fs/ got alot bigger - if it gets smaller or at least the
>>same size as 2.4 it's clearly a sign of inlines gone mad in the
>>filesystem/VM code and we need to look at that. If not we have to look
>>elsewhere.
>
> I have my humbling opinion:
>
> In 2.4.20 (m68knommu):
> -------------------------------------------------------------------------
> #define current _current_task
> -------------------------------------------------------------------------
>
> In 2.6.0-test1 (m68knommu):
> -------------------------------------------------------------------------
> static inline struct task_struct *get_current(void)
> {
[cut]
> }
> static inline struct thread_info *current_thread_info(void)
> {
[cut]
> }
> -------------------------------------------------------------------------
>
> This takes 18*11 = 198 bytes just for invoking the 'current'
> macro so many times.
>

Just curious.

Is there any way to guess inline from inline?

I mean 'inline' which means 'this has to be inlined or it will
break' and 'inline' which means 'inline this please - it adds only 10k
of code bloat and improve performance in my suppa-puppa-bench by 0.000001%!'

Strictly speaking - separate 'inline' to 'require_inline' and
'better_inline'.
So people who really care about image size - can turn
'better_inline' into void, without harm to functionality.
Actually I saw real performance improvements on my Pentium MMX 133
(it has $i16k+$d16k of caches I beleive) when I was cutting some of
inlines out. and I'm not talking about (cache poor) embedded systems...