Re: Swap Files

Andrew E. Mileski (aem@ott.hookup.net)
Sun, 19 Jan 1997 13:19:00 -0500 (EST)


> > How about changing sys_swapoff() too? Perhaps adding a flags parameter
> > like sys_swapon() already has?
> >
> > Note: I am prepared to make these changes myself.
>
> Fix the distributions, fix swapoff but don't keep dumping on the kernel to
> fix user mode problems.
>
> Alan

You obviously don't understand the problem. That is my fault for not
explaining it better.

Swap files are created on-the-fly by a daemon. At shutdown, the daemon
is killed off before it has a chance to get rid of all the swap files
it created.

The task of getting rid of the swap files falls to the shutdown scripts,
which have no way to track which swap files are in use.

Adding a /proc/swap entry that shows all swap areas allows a modified
swapoff command to properly turn off all swapping.

Yes, this is a user space problem, but it requires a little bit of
help from the kernel (in the form of /proc/swap).

--
Andrew E. Mileski   mailto:aem@ott.hookup.net
Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html