LWN.net Logo

CONFIG_TINY

From:  Rasmus Andersen <rasmus@jaquet.dk>
To:  linux-kernel@vger.kernel.org
Subject:  CONFIG_TINY
Date:  Wed, 30 Oct 2002 23:36:05 +0100

Hi,

This details some new patches I have done as part of my
CONFIG_TINY exploration. Executive summary: Nothing earth-
shattering covered. I have made a few new patches and 
brought acme's initstr stuff forward (I hope. Most of 
it anyway.)

Patches:
 o Notes: noswap, noscript, noinline, hashes kernels have 
   been boot tested. 'all' haven't, only so much time for
   fun in a day.

 o config: Patches arch/i386/config.in to allow selection of
   the patches below. Note that the noinline stuff is not
   configurable.
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-config

 o noswap: Disabling swap by stubbing out all of swapfile.c,
   swap_stat.c, page_io.c, highmem.c and some of memory.c. 
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-noswap

 o noscript: Removing binfmt_script from the kernel. I had
   expected my machine to have severe difficulties booting 
   with this one but there was no problems at all... Some 
   think required here (for me, at least).
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-noscript

 o noinline: Same patch as last time (a forward port of
   an old Andrew Morton patch). I tried to do some mindless,
   aggressive uninlining but that expanded my kernel, so I
   need to think a bit more about this (yet again).
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-noinlines

 o nohashes: Minimises the VFS hashes and makes the network
   hashes 1/16 of their former size (down to a single page). 
   These numbers are arbitrarily chosen. Comments welcome.
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-nohashes
          
 o allinone: All of the above rolled up into one.
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-allinone

 o initstr: Marks strings from __init functions as __initdata.
   Only some of the kernel covered so far. Large patch.
   Patch at: www.jaquet.dk/kernel/config_tiny/2.5.44-initstr


Below is a table with a 2.5.44 kernel constrasted with
2.5.44 kernels patched with the named patch (only compile
time ones are listed). Size of vmlinux along with the four 
first columns from 'size vmlinux' are displayed.

The .config is 'allnoconfig'. 

              vmlinux        size fields 
               size    text    data    bss     dec   
base kernel   681405  481005  50913  252512  784430
noswap        667644  469197  50945  250144  770286
noscript      681150  480541  50877  252512  783930   
noinlines     678345  476733  50913  252512  780158
allinone      664329  464445  50909  250144  765498


Note that the reason the all patch doesn't accumulate
the gains from the noswap and the noinlines is that
the noinlines patch touches a lot of stuff that the
noswap patch subsequently disables.

As before, your comments and suggestions will be
appreciated.

Regards,
  Rasmus


Copyright © 2002, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds