Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2004 13:56:45 -0400
From:      David Schultz <das@FreeBSD.ORG>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.ORG>
Cc:        Current <freebsd-current@FreeBSD.ORG>
Subject:   Re: panic: swap_pager_isswapped: failed to locate all swap meta blocks
Message-ID:  <20040925175645.GA819@VARK.MIT.EDU>
In-Reply-To: <20040925095734.GI9550@darkness.comp.waw.pl>
References:  <7m7jqjhojv.wl@black.imgsrc.co.jp> <20040924122508.GG9550@darkness.comp.waw.pl> <20040924161255.GA699@VARK.MIT.EDU> <20040925095734.GI9550@darkness.comp.waw.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 25, 2004, Pawel Jakub Dawidek wrote:
> On Fri, Sep 24, 2004 at 12:12:56PM -0400, David Schultz wrote:
> +> One way to speed it up would be to wait until after most userland
> +> processes have been killed, since most of the data won't need to
> +> be swapped back in in that case.  In fact, this is an improvement
> +> for another reason, namely, there might not be enough physical
> +> memory for swapoff() to work otherwise.
> 
> I'm not really aware how to define rcNG scripts order on shutdown.
> We can also move swapoff to kernel to be called even after all file
> systems are unmounted.

Yep, doing it in the kernel is what I was thinking.  If you wait
until all the userland processes are gone, swapoff() should be
practically free.

Another option would be to add some magic involving the SW_CLOSING
flag, which indicates to the swap subsystem that nothing should be
swapped to a given device in addition to what's already there.
After setting the flag and waiting for any outstanding putpages()
operations to complete, I believe the underlying device could be
downgraded to read-only safely without swapping anything back in.
But interlocking with putpages() might be more trouble than it's
worth.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040925175645.GA819>