Re: 2.1 kernel bloat revisited

Mark A. Breuer (breuer@nfinity.com)
Sat, 29 Mar 1997 21:05:02 +0000 (GMT)


I can thing of a great reason why the kernel SOURCE is growing! The 2.1.x
kernels are adding more support for new hardware, and new protocols. If
it werent for these reason's, I can't think of a thing to continue
development for. 1.0.x is smaller then 1.2.x, which is smaller then
2.0.x. Though after you compile the kernel the actual image in many
case's is smaller, thanks in great part to loadable modules. If you are
that much need of disk space, and don't need to rebuild any thing, or have
a nother box that you can build stuff on, wipe the source from that
machine. I ran like that till I added another hard drive to my 386,
though I could build everything on my Pentium.

Linux is not windows. Just cause the source code is growing, doesn't mean
that the image(s) you need to boot need to be larger!

Mark A. Breuer
-------------------------------------------------------------------------
What, you can't stand to run Crash 95 on that older 386, or 486?
Then don't! Their are operating systems that run great on 386's and up.
This messages was composed on one such example: Linux 2.0.29 i386
-------------------------------------------------------------------------

On Sat, 29 Mar 1997 kdp0101@hpmail.lrz-muenchen.de wrote:

> Hi,
>
> I noticed that the 2.1.29 kernel image is much bigger than the 2.0.29
> image. To check it out I wrote a small perl script to compare
> "nm --size-sort -t d" listings. It only gives a rough estimate of course
> but it is still a useful bloat-o-meter.
>
> Here is some data from a 2.0.29-2.1.29 comparison. It was generated
> by sizean 2.0.29-map 2.1.29-map | grep -v new |sort -n +3:
>
>
> Symbol Old size New size Delta Change
> SHATransform 00006796 00000364 -6432 -94.6439
> [ A good guy :) ]
> [...]
> add_timer 00000052 00000352 300 +576.923
> sys_init_module 00001028 00001328 300 +29.1828
> create_aout_tables 00000208 00000516 308 +148.076
> ncr_getclock 00000216 00000528 312 +144.444
> raw_sendto 00000392 00000712 320 +81.6326
> udp_err 00000212 00000532 320 +150.943
> unix_bind 00000332 00000656 324 +97.5903
> ip_getsockopt 00000864 00001200 336 +38.8888
> locks_mandatory_area 00000004 00000344 340 +8500
> sys_olduname 00000164 00000504 340 +207.317
> get_module_list 00000436 00000784 348 +79.8165
> arp_req_set 00000732 00001088 356 +48.6338
> igmp_send_report 00000220 00000584 364 +165.454
> ncr_init 00000996 00001388 392 +39.3574
> ncr_complete 00001280 00001680 400 +31.25
> set_multicast_list 00000060 00000476 416 +693.333
> read_zero 00000060 00000524 464 +773.333
> ip_rt_event 00000056 00000540 484 +864.285
> timer_bh 00000332 00000824 492 +148.192
> fd_ioctl 00003108 00003604 496 +15.9588
> udp_sendto 00000232 00000832 600 +258.620
> ip_setsockopt 00001472 00002080 608 +41.3043
> sock_getsockopt 00000432 00001044 612 +141.666
> ip_rt_redirect 00000336 00001016 680 +202.380
> ncr_attach 00001288 00001988 700 +54.3478
> ip_rt_ioctl 00000164 00000892 728 +443.902
> ppp_tty_ioctl 00002200 00002936 736 +33.4545
> vt_ioctl 00006980 00009248 2268 +32.4928
> [ Not sure where this comes from. I hope a few s/get_user/__get_user/
> and s/put_user/__put_user/ will help. ]
> ext2_sync_file 00000164 00003092 2928 +1785.36
> [ This can be easily fixed for little endian machines. ]
> rp_sidt 00000025 00003625 3600 +14400
>
> The big increase in the _ioctl() functions seem to suggest that the
> new _user() user memory access primitives generate much more code
> than the 2.0 routines.
>
> Here is the sizean script:
>
> #!/usr/bin/perl
> # - bloat-o-meter -
> # by Andi Kleen
> # f1 and f2 are nm --size-sort -t d x.o files
>
> die "usage: $0 file1 file2\n" if $#ARGV < 1 || $#ARGV>2;
>
> open(F1,"<$ARGV[0]") || die "cannot open $AGRV[0] ($!)\n";
> open(F2,"<$ARGV[1]") || die "cannot open $ARGV[1] ($!)\n";
>
> while (<F1>) {
> ($size, $type, $name) = split;
> if ($type !~ /[tT]/) { next; }
> $t1{$name} = $size;
> }
> while(<F2>) {
> ($size, $type, $name) = split;
> next if $type !~ /[tT]/;
> if (defined $t1{$name}) {
> $olds=$t1{$name};
>
> next if $olds == $size; # only changed sizes
>
> $delta = $size-$olds;
> $change = (($size-$old)/($olds == 0 ? 1 : $olds))*100-100;
> $change=($change>0 ? "+":"") . "$change";
> write;
> } else {
> $olds = "(new)";
> $delta = $size;
> $change = "";
> write;
> }
> }
>
> format STDOUT_TOP =
> Symbol Old size New size Delta Change
>
> .
>
> format STDOUT =
> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<< @<<<<<<< @<<<<<<< @<<<<<<<
> $name $olds $size $delta $change
> .
>
> -Andi
>
>
>
>