tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: unconfiguring swap at shutdown

On Tue, Sep 02, 2008 at 02:37:43PM -0400, Thor Lancelot Simon wrote:
> > It sill can be, if there are some file left in tmpfs. These files won't
> > dissapear because no more process are running.
> What I'm suggesting is that when this code runs in the kernel after all
> processes have exited, it should be impossible for anything to try to _use_
> such a file.  No processes remain to try to use any files; only the kernel
> is running.  So simply discarding the pages should be fine.

Well, from what I understood the *kernel* needs to access /dev to
unconfigure swap devices (I don't knwo the technical details, but someone
else pointed this out before in this thread). So we can't kill tmpfs
pages before swapoff, because /dev may be a tmpfs.

> Besides, even if some in-kernel consumer tried to use such a file, we
> have deadfs to address that.

I'm not sure it'd work; I guess the kernel needs /dev to get a
valid vnode to the device.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index