[lkml]   [1997]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Swap Files

    On Sun, 19 Jan 1997 13:19:00 -0500 (EST), "Andrew E. Mileski"
    <> said:

    >> 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.

    I think we _do_ understand the problem, but it is still a problem with
    the local system setup, not with the kernel...

    > 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.

    That's a bug. If you want that sort of behaviour, better to make the
    daemon do a swapoff of all of its own swap files before it dies.
    That's why shutdown delivers two separate signals to outstanding
    daemons: a SIGTERM which the daemons can trap and die cleanly on, and
    then a SIGKILL to clean up any remaining daemons still lurking.

    > 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.

    Nope, it falls to whoever set up the swap files. An alternative
    solution would be to let the swapfile daemon write its current state
    to /etc/swaptab (similar to the way mount writes to /etc/mtab), and
    use that to swapoff at shutdown. Either way, this is a user-space
    problem, not a kernel space one.

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

    Yup. However, I tend to dislike bloating the kernel with things like
    this which can be done perfectly well from user space. At the very
    least, you should never rely on kernel extensions to do a job which
    can be done fine without any kernel help.


     \ /
      Last update: 2005-03-22 13:38    [W:0.020 / U:2.752 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site