linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <d2nx.4QV.15@gated-at.bofh.it>]
* Re: [uClinux-dev] Kernel 2.6 size increase - get_current()?
@ 2003-07-24  8:27 Ihar "Philips" Filipau
  2003-07-24 11:50 ` David McCullough
  0 siblings, 1 reply; 20+ messages in thread
From: Ihar "Philips" Filipau @ 2003-07-24  8:27 UTC (permalink / raw)
  To: David McCullough; +Cc: linux-kernel

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.


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Kernel 2.6 size increase
@ 2003-07-23 18:46 Bernardo Innocenti
  2003-07-23 20:22 ` [uClinux-dev] " David S. Miller
  0 siblings, 1 reply; 20+ messages in thread
From: Bernardo Innocenti @ 2003-07-23 18:46 UTC (permalink / raw)
  To: uClinux development list; +Cc: linux-kernel

Hello,

code bloat can be very harmful on embedded targets, but it's
generally inconvenient for any platform. I've measured the
code increase between 2.4.21 and 2.6.0-test1 on a small
kernel configuration for ColdFire:

   text    data     bss     dec     hex filename
 640564   39152  134260  813976   c6b98 linux-2.4.x/linux
 845924   51204   78896  976024   ee498 linux-2.5.x/vmlinux

I could provide the exact .config file for both kernels to
anybody interested. They are almost the same: no filesystems
except JFFS2, IPv4 and a bunch of small drivers. I have no
SMP, security, futexes, modules and anything else not
strictly needed to execute processes.

I've made a linker map file and compared the size of single
subsystems. These are the the major contributors to the
size increase:

  kernel/   +27KB
  mm/       +14KB
  fs/       +47KB
  drivers/  +35KB
  net/      +64KB

I've digged into net/ with nm -S --size-sort. It seems that
the major increase is caused by net/xfrm/. Could this module
be made optional?

In fs/, almost all modules have got 30-40% bigger, therefore
bloat is probably caused by inlines and macros getting more
complex.

Block drivers and MTD have generally become smaller. Character
devices are responsable for most of the size increase in drivers/.

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2003-07-25 18:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cwQJ.3BO.29@gated-at.bofh.it>
     [not found] ` <cypH.5dM.35@gated-at.bofh.it>
     [not found]   ` <cyza.5lN.13@gated-at.bofh.it>
     [not found]     ` <cArg.74D.11@gated-at.bofh.it>
2003-07-24  8:13       ` [uClinux-dev] Kernel 2.6 size increase - get_current()? Ihar "Philips" Filipau
2003-07-25  7:25         ` Denis Vlasenko
2003-07-25 18:36         ` bill davidsen
     [not found] <d2nx.4QV.15@gated-at.bofh.it>
     [not found] ` <dbTZ.5Z5.19@gated-at.bofh.it>
2003-07-25 15:37   ` Ihar "Philips" Filipau
2003-07-24  8:27 Ihar "Philips" Filipau
2003-07-24 11:50 ` David McCullough
  -- strict thread matches above, loose matches on Subject: below --
2003-07-23 18:46 Kernel 2.6 size increase Bernardo Innocenti
2003-07-23 20:22 ` [uClinux-dev] " David S. Miller
2003-07-23 20:27   ` Christoph Hellwig
2003-07-23 22:35     ` [uClinux-dev] Kernel 2.6 size increase - get_current()? Bernardo Innocenti
2003-07-23 22:37       ` Alan Cox
2003-07-23 23:00         ` Bernardo Innocenti
2003-07-24  5:06           ` David McCullough
2003-07-24 11:28             ` Alan Cox
2003-07-24 12:04               ` David McCullough
2003-07-24 14:48                 ` Alan Cox
2003-07-25 18:25                 ` bill davidsen
2003-07-24 15:30               ` Hollis Blanchard
2003-07-24 19:37                 ` Alan Cox
2003-07-24 19:51                   ` Hollis Blanchard
2003-07-24 21:20                     ` J.A. Magallon
2003-07-25  4:22                       ` Otto Solares
2003-07-25 14:38                         ` Hollis Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).