kernel - SWAP CACHE part 6/many - Refactor swap_pager_freespace()
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 4 Feb 2010 03:02:45 +0000 (19:02 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 4 Feb 2010 03:02:45 +0000 (19:02 -0800)
commit8d292090b933bb902477afb2312e290b83bb7d16
treeff2a1e87501d0049f57e0fbb988a7fb78b5054cd
parentf9ab53b8a88b37d719f8f9763132d71421e96f24
kernel - SWAP CACHE part 6/many - Refactor swap_pager_freespace()

* Refactor swap_pager_freespace() to use a RB_SCAN() instead of a
  vm_pindex_t iteration.  This is necessary if we intend to allow
  swap backing store for vnodes because the related files & VM objects
  can be huge.  This is also generally a good idea in 64-bit mode
  to help deal with x86_64's massive address space.

* Start adding swap space freeing calls in the OBJT_VNODE handling code
  and generic VM object handling code.

* Remove various checks for OBJT_SWAP from swap*() and swp*() functions
  to allow them to be used with OBJT_VNODE objects.

* Add checks for degenerate cases to reduce call overheads as the swap
  handling functions are now called for vnode objects too.

* Add assertions for pagers which do not need swap support.
sys/vm/default_pager.c
sys/vm/device_pager.c
sys/vm/phys_pager.c
sys/vm/swap_pager.c
sys/vm/swap_pager.h
sys/vm/vm_object.c
sys/vm/vm_pager.c
sys/vm/vnode_pager.c