Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 14:00:35 -0700
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Peter Wemm <peter@wemm.org>, Sean Kelly <smkelly@zombie.org>, hackers@FreeBSD.ORG
Subject:   Re: swapoff?
Message-ID:  <20020713210035.GA363@HAL9000.wox.org>
In-Reply-To: <200207131636.g6DGaoqh081285@apollo.backplane.com>
References:  <20020713071911.GA1558@HAL9000.wox.org> <20020713073404.9869A3811@overcee.wemm.org> <20020713115746.GA2162@HAL9000.wox.org> <200207131636.g6DGaoqh081285@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Matthew Dillon <dillon@apollo.backplane.com>:
>     We are not going to be doing any sort of weighting.  It's an idea whos
>     time has come... and gone again.  It might have been useful 8 years ago
>     but it is not useful today.
> 
>     Also, please note that it is not possible to reverse-lookup a swap bitmap
>     block and get the VM object / page number.  The OBJT_SWAP VM objects have
>     to be scanned to get the swap bitmap blocks.  Nor does it make much sense
>     to try to 'record' the blocks somewhere, there could be hundreds of 
>     thousands of blocks and memory is not normally a luxury in this situation.

I'm aware of that.  That's why swapoff is a harder project; it
requires working at more levels of abstraction, not all of which I
fully understand yet.  At least most of the VM stuff is
well-documented now. ;-)

>     All you need to do is prevent new blocks from being allocated from the
>     old swap device.  Since the radix tree bitmap code cannot make a
>     distinction between devices the easiest way to do this is to simply
>     allocate all the free bits associated with the device (which you can do),
>     and prevent any existing allocated blocks from being freed from the
>     bitmap (which is a simple calculation) ... and of course mark the page
>     dirty again since its backing store is being ripped out from under it.

This makes sense.  I was originally thinking of marking the device
as off-limits to new allocations, but I realize now why that would
not work.  As long as the logical swap blocks that correspond to
the device are still fair game for the swap pager, swapdev_strategy
will still have to swap out to the device.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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