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:15:57PM +0200, Manuel Bouyer wrote:
> On Tue, Sep 02, 2008 at 05:17:55AM -0400, Thor Lancelot Simon wrote:
> > On Tue, Sep 02, 2008 at 11:12:41AM +0200, Manuel Bouyer wrote:
> > >
> > > One quite common case is mfs/tmpfs. You can't umount them before turning
> > > off swap because they may be /dev, and swapoff needs /dev to be mounted.
> > > Turning off swap before unmonting them means bringing back their pages
> > > into ram; with the risk they don't fit in ram ...
> >
> > This certainly should not be the case for turning off swap in-kernel after
> > all user processes have exited!
>
> 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.
Besides, even if some in-kernel consumer tried to use such a file, we
have deadfs to address that.
Thor
Home |
Main Index |
Thread Index |
Old Index