[lkml]   [1997]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Swap Files
Date (Alan Cox) writes:
> Fix the distributions, fix swapoff but don't keep dumping on the kernel to
> fix user mode problems.

Agreed. Changing swapoff (with the necessary kernel support) so that
it can remove all swap partitions is going to confuse programs such as
swapd which manage swap files themselves.

All you need is for swapon to create an entry in "/etc/swtab" (c.f.
/etc/mtab) when it enables swap partitions or files. It will contain
the swap paritions in /etc/fstab that were enabled using "swapon -a",
and also any that were added manually. Then "swapoff -a" will disable
all of the partitions that "swapon" enabled[1].

No kernel bloat. Available in a stable kernel near you[2].

[1] However, you need a "-n" flag to enable swap on a read-only root
partition, so you also have a "-f" flag to put the entry in /etc/swtab
after the root partition is r/w.

[2] If somebody writes it...

`O O' |
// ^ \\ |

 \ /
  Last update: 2005-03-22 13:38    [W:0.036 / U:1.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site