Re: panic: swap_pager_isswapped: failed to locate all swap meta blocks

From: David Schultz <das_at_FreeBSD.ORG>
Date: Sat, 25 Sep 2004 13:56:45 -0400
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.
Received on Sat Sep 25 2004 - 15:56:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:13 UTC