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

next in thread | previous in thread | raw e-mail | index | archive | help
    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.

    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.

						-Matt


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?200207131636.g6DGaoqh081285>