:BTW, NetBSD's new UVM code has the ability to do this.  Perhaps
:it's worth looking in to how difficult it would really be in FreeBSD...
:
:To Unsubscribe: send mail to [EMAIL PROTECTED]
:with "unsubscribe freebsd-hackers" in the body of the message

    Someone got it mostly working a year or two ago if I remember right
    but I don't know what happened to it finally.

    Implementing swapoff is a bunch of grunt-work but not too hard in
    concept.  Basically the work involved is this:

        * Make a calculation to be sure that it is possible to turn off
          the swap device and not run the system out of VM.  If it is not
          possible do not allow the swapoff.

        * Allocate all the free bitmap bits related to the swap device you
          are trying to remove to prevent pageouts to the device you are
          removing.

        * Flag the swap device being removed and then scan all OBJT_SWAP
          VM Objects looking for swap blocks associated with the device,
          and force a page-in of those blocks.  The getpages code for the
          swap backing store would detect the flag and not clear the swap
          bitmap bits as it pages-in the data.

          (Forcing a pagein may force pages to cycle back out to another
          swap device, so special treatment of the paged-in pages (like
          immediately placing it in the VM page cache instead of the 
          active or inactive queues) is necessary to reduce load effects
          on the system.

        * The swap device being removed can now be closed and the related
          swap device index marked free.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to