From: lars brinkhoff (
Date: Fri Apr 28 2000 - 04:11:24 EST

Graham Stoney wrote:
> lars brinkhoff writes:
> > I think this comment by Russel King answers my question:
> > Naik, Uday writes:
> > > I would like to turn swapping off. How do I build the
> > > kernel that way. I don't see a configuration option for it.
> > The short answer is: no. The long answer is: swapping is an
> > embedded part of the Linux kernel, and is not trivial to turn
> > off. The fact that you don't have any swap space doesn't mean
> > that this code is redundant. This code is also used to page
> > out clean pages when memory gets tight.
> 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.

A quick test doing this by hand (#if 0'ing everthing in mm/swapfile.c,
compiling, and then re-enabling everything needed) doing this by hand
yields a saving of 5952 bytes (using the 'size' command on vmlinux).

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:14 EST