From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: dalecki@evision.ag
Cc: Linux-Kernel list <linux-kernel@vger.kernel.org>,
Christer Weinigel <wingel@hog.ctrl-c.liu.se>
Subject: Re: PATCH 2.4.17.2: make ext2 smaller
Date: Sun, 02 Dec 2001 12:42:21 -0500 [thread overview]
Message-ID: <3C0A67FD.D2D59E84@mandrakesoft.com> (raw)
In-Reply-To: <3C0A1105.18B76D64@mandrakesoft.com> <3C0A5A61.62A0F885@evision-ventures.com>
Martin Dalecki wrote:
>
> Jeff Garzik wrote:
> >
> > I do not plan to submit this patch to Linus/Marcelo.
> >
> > This patch applies an obvious technique to the kernel: increase the
> > amount of code compiled in a single compilation unit, to increase the
> > overall knowledge the compiler has of the code, to allow for better
> > optimization and dead code removal. KDE does this, with definite
> > success, though they definitely are not the first to do this.
> >
> > Simply, all ext2 files are #include'd into a single file, ext2_all.c,
> > and all functions and data structures are declared static.
> >
> > This technique can be used in the kernel, userspace applications, and
> > userspace libraries to decrease icache footprint and overall size of
> > your applications.
> >
> > Results from 2.4.17-pre2 plus the attached patch: 1135 bytes saved in
> > vmlinux, simply from making all the functions static.
> > (*.orig is prior to my patch. kernel is P2 SMP-based)
> > > [jgarzik@rum linux-e2all]$ ls -l vmlinux* arch/i386/boot/bzImage*
> > > -rw-r--r-- 1 jgarzik jgarzik 1030259 Dec 2 06:18 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 2814631 Dec 2 06:18 vmlinux*
> > > -rwxr-xr-x 1 jgarzik jgarzik 2815766 Dec 2 06:04 vmlinux.orig*
> r
>
> size vmlinux
> and
> size vmlinux.orig
>
> would be a bit more telling whatever the reaons of the impact is.
easily done, on the latest CONFIG_FINAL patch posted to lkml:
[jgarzik@rum linux.test]$ size vmlinux.vanilla
text data bss dec hex filename
1908047 274672 353340 2536059 26b27b vmlinux.vanilla
[jgarzik@rum linux.test]$ size vmlinux
text data bss dec hex filename
1905136 273808 352860 2531804 26a1dc vmlinux
--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno
next prev parent reply other threads:[~2001-12-02 17:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-02 11:31 PATCH 2.4.17.2: make ext2 smaller Jeff Garzik
2001-12-02 11:54 ` Keith Owens
2001-12-02 12:33 ` Ingo Oeser
2001-12-02 13:00 ` PATCH 2.4.17.2: CONFIG_FINAL, make kernel smaller Jeff Garzik
2001-12-02 13:07 ` Jeff Garzik
2001-12-02 13:03 ` PATCH 2.4.17.2: make ext2 smaller Jeff Garzik
2001-12-02 13:40 ` Ingo Oeser
2001-12-02 13:47 ` Jeff Garzik
2001-12-02 13:53 ` Ingo Oeser
2001-12-02 16:14 ` Christer Weinigel
2001-12-02 16:44 ` Martin Dalecki
2001-12-02 17:42 ` Jeff Garzik [this message]
2001-12-02 21:30 ` Andrew Morton
2001-12-02 21:35 ` Jeff Garzik
2001-12-03 2:53 ` Horst von Brand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C0A67FD.D2D59E84@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=dalecki@evision.ag \
--cc=linux-kernel@vger.kernel.org \
--cc=wingel@hog.ctrl-c.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox