[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.018 / U:83.060 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site