lkml.org 
[lkml]   [2001]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPATCH 2.4.17.2: CONFIG_FINAL, make kernel smaller
Ingo Oeser wrote:
> On Sun, Dec 02, 2001 at 10:54:34PM +1100, Keith Owens wrote:
> > On Sun, 02 Dec 2001 06:31:17 -0500,
> > Jeff Garzik <jgarzik@mandrakesoft.com> wrote:
> > >Simply, all ext2 files are #include'd into a single file, ext2_all.c,
> > >and all functions and data structures are declared static.
> >
> > I like it.
>
> Me also. Except for the KSTATIC spread all over the Kernel.

Yes :/ The source code is definitely uglier. Maybe 'kstatic' would be
better on the eyes.

I just converted reiserfs and linux/kernel directories to KSTATIC.
ftp://ftp.kernel.org/pub/linux/kernel/people/jgarzik/patches/2.4.17/config-final-2.4.17.2.patch.gz
(should appear on ftp.kernel.org and mirrors soon, if not already)

Bytes saved/eliminated:
ext2: 1135
reiserfs: 2966
kernel: 2578

total: 6679 bytes saved

The conversion of linux/kernel was surprising... I only changed two
'int' variables to KSTATIC. That implies to me that the majority of the
space savings might simply come from the better packing created when
compiling all the files into a single .o.

I would like to also point out a nice fringe benefit: since an entire
subsystem/driver is compiled together, you find bugs. I have found
[tiny, unimportant] bugs in all the code I have converted to KSTATIC so
far.

> [jgarzik@rum linux-e2all]$ ls -l vmlinux* arch/i386/boot/bzImage*
> -rw-r--r-- 1 jgarzik jgarzik 1030123 Dec 2 07:50 arch/i386/boot/bzImage
> -rw-r--r-- 1 jgarzik jgarzik 1030263 Dec 2 06:04 arch/i386/boot/bzImage.orig
> -rwxr-xr-x 1 jgarzik jgarzik 2809087 Dec 2 07:50 vmlinux*
> -rwxr-xr-x 1 jgarzik jgarzik 2815766 Dec 2 06:04 vmlinux.orig*

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.086 / U:3.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site