[Rule] smaller kernels via extra gcc optimization

Jason Bechtel jasonmbechtel at gmail.com
Thu Jan 5 18:55:30 EET 2006


I thought this was important enough to resubscribe to the list in
order to post it.  It's a recent tiny patch to the kernel that changes
the way it is compiled.  If anyone on this list is experimenting with
creating smaller kernels, HEADS UP!

>From LWN:
Drawing the line on inline
http://lwn.net/SubscriberLink/166172/89e206e16d103a56/

"Ingo Molnar recently raised this issue with a set of patches changing
how the kernel is built. By turning on unit-at-a-time compilation
(which causes gcc to consider an entire file in its optimization
decisions) and by turning off forced inlining, he was able to achieve
a 5.3% size reduction. Taking things to an extreme, and applying these
patches to an "allyesconfig" kernel (one with all configuration
options turned on) results in a nearly 25% smaller kernel. That is, to
say the least, a significant size reduction to be achieved by such a
small patch. Anybody interested in de-bloating the kernel should be
paying attention."

http://lwn.net/Articles/166182/
http://lwn.net/Articles/166184/

"enabling CONFIG_CC_OPTIMIZE_FOR_SIZE gives a 20.4% size reduction,
and adding my latest debloating-queue gives an additional 4.5% of
reduction."




This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here