Thus spake Matthew Dillon <[EMAIL PROTECTED]>: > 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

