linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kernel 2.6 size increase
@ 2003-07-23 18:46 Bernardo Innocenti
  2003-07-23 19:14 ` Richard B. Johnson
  2003-07-23 19:32 ` [uClinux-dev] " Christoph Hellwig
  0 siblings, 2 replies; 59+ 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] 59+ messages in thread
* Re: [uClinux-dev] Kernel 2.6 size increase
@ 2003-07-25 20:42 John Bradford
  0 siblings, 0 replies; 59+ messages in thread
From: John Bradford @ 2003-07-25 20:42 UTC (permalink / raw)
  To: davidsen, linux-kernel

> | > >    text    data     bss     dec     hex filename
> | > >  633028   37952  134260  805240   c4978 linux-2.4.x/linux-Os
> | > >  819276   52460   78896  950632   e8168 linux-2.5.x/vmlinux-inline-Os
> | > >  ^^^^^^
> | > >        2.6 still needs a hard diet... :-/
> | >
> | > I did the same observation a few weeks ago on 2.5.74/gcc-2.95.3. I tried
> | > to track down the responsible, to the point that I completely disabled
> | > every driver, networking option and file-system, just to see, and got about
> | > a 550 kB vmlinux compiled with -Os. 550 kB for nothing :-(
> | 
> | Some of the bigger 2.6 additions cannot be configured out.
> | I wish sysfs and the different I/O schedulers could be removed.

I thought that an optimisation for text size in 2.4 had been purposely
taken out of the 2.5 tree, because we expected GCC to do it
automatically by the time 2.6 was released?

> Perhaps after 2.6.n is out and stable for a month or so someone could
> look at the problem. Certainly the various io schedulers are good
> candidates for being optional and/or modules. The problem is that the
> parts which aren't needed aren't large, so you may not gain much.
>
> Clearly you have to have *some* io scheduler

For embedded systems, or anything completely solid state which doesn't
use a traditional spinning-disk-with-moving-heads, you could replace
it with a very simple one, and not loose much performance.

> I'm not sure if sysfs is optional in any meaningful way any more. I
> haven't tried running w/i /proc in a few months, it didn't work when
> I did, but old kernels are old news.

Try compiling out TCP/IP if your application doesn't need it.  A lot
of embedded systems don't.

John.

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

end of thread, other threads:[~2003-08-08 14:43 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-23 18:46 Kernel 2.6 size increase Bernardo Innocenti
2003-07-23 19:14 ` Richard B. Johnson
2003-07-23 20:07   ` David S. Miller
2003-07-23 21:47     ` Randy.Dunlap
2003-07-23 19:32 ` [uClinux-dev] " Christoph Hellwig
2003-07-23 20:11   ` David S. Miller
2003-07-23 20:15     ` Christoph Hellwig
2003-07-23 20:22       ` 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
2003-07-28  3:19                                 ` Miles Bader
2003-07-28  8:14                                   ` Ihar "Philips" Filipau
2003-07-28  8:58                                     ` Miles Bader
2003-07-28  9:03                                       ` Ihar "Philips" Filipau
2003-07-23 21:57   ` [uClinux-dev] Kernel 2.6 size increase Bernardo Innocenti
2003-07-23 22:07     ` Bernardo Innocenti
2003-07-23 22:27       ` Willy Tarreau
2003-07-23 22:34         ` Alan Cox
2003-07-24 20:27         ` Bernardo Innocenti
2003-07-25 15:46           ` Christoph Hellwig
2003-07-25 23:55             ` [PATCH] Make I/O schedulers optional (Was: Re: Kernel 2.6 size increase) Bernardo Innocenti
2003-07-26  8:17               ` Andrew Morton
2003-07-26 12:40                 ` Bernardo Innocenti
2003-07-26 14:07                   ` Jens Axboe
2003-07-26 23:42                     ` Bernardo Innocenti
2003-07-26 23:41                       ` Jens Axboe
2003-07-28 17:13             ` [uClinux-dev] Kernel 2.6 size increase Nicolas Pitre
2003-07-28 23:02               ` Bernardo Innocenti
2003-07-29  2:36                 ` Miles Bader
2003-08-08 13:25                 ` [uClinux-dev] " David Woodhouse
2003-08-08 14:37                   ` Bernardo Innocenti
2003-08-08 14:43                     ` David Woodhouse
2003-07-25 18:16           ` bill davidsen
2003-07-29 22:29           ` Tom Rini
2003-07-29 22:48             ` Alan Cox
2003-07-29 23:06               ` Tom Rini
2003-07-30  2:07                 ` Miles Bader
2003-07-30 15:33                   ` Tom Rini
2003-07-31  1:49                     ` Miles Bader
2003-07-31  4:17                       ` Tom Rini
2003-07-31  5:03                         ` Miles Bader
2003-07-31 15:24                           ` Tom Rini
2003-07-30  2:49             ` [uClinux-dev] " Bernardo Innocenti
2003-07-30 15:35               ` Tom Rini
2003-07-30 16:45                 ` [uClinux-dev] Kernel 2.6 size increase (PATCH) Bernardo Innocenti
2003-07-25 20:42 [uClinux-dev] Kernel 2.6 size increase John Bradford

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).