From: Russell King (
Date: Fri Apr 28 2000 - 04:38:30 EST

Graham Stoney writes:
> I think this is a matter of degree. Certainly the non-trivial sys_swapon and
> sys_swapoff functions could easily be wrapped in a hypothetical
> #ifdef CONFIG_SWAPPING, and my --function-sections patch would then take out
> whatever other parts of the swap & vm code then become unused, without any
> further #ifdef's. Only a medium sized saving perhaps, but it sounds like a
> good idea to me.

Yes, that would get rid of the two syscalls, but they're probably only
around 2K. You could probably improve on that easily and cleanly:

1. get rid of swapfile.c from the compilation, and replace a couple
   of functions with dummy functions
2. replace swap_state.c with a set of dummy functions

I guess you could save around 10KB of code, and around 150 bytes of data.

Oh, if any of the mm people are reading this, what about killing the
redundant zero initialisers so that these variables can be placed in
the BSS? A quick grep of the mm/ code reveals 11 instances where data
is initialised to zero, and 4 cases where pointers are initialised to
NULL. by searching the first level down from linux/, there are 65
instances of explicit initialisation to 0, and 19 instances of
initialisation to NULL. I can supply a patch to remove these if anyone
is interested.
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King --- ---
  | | | | / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:15 EST