kernel - SWAP CACHE part 1/many - Convert swblock to a Red-Black tree
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 3 Feb 2010 04:36:21 +0000 (20:36 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 3 Feb 2010 04:57:44 +0000 (20:57 -0800)
commit96adc7538c33c47d4e6fce31d06ccf00f5aac3fa
tree3ef21999df63a0e2441bc08e9794b00bea4f2ab0
parentf2b2e6b4dbd02849f88e25547e1686a39da23aa5
kernel - SWAP CACHE part 1/many - Convert swblock to a Red-Black tree

* Convert struct swblock from being hashed to a per-vm_object RB tree.
  This remove two pointers from struct swblock but adds a RB_ENTRY which
  is three pointers and an integer, so swblock gets a little more
  bloated.

* Optimize swp_pager_meta_free_all().  We previously indexed through
  the entire VM object's size which doesn't scale well for 64-bit
  or for swap-cached vnodes.  Now we need only iterate the RB tree.

* Move swblock fields out of the VM pager union and make them part of the
  native vm_object structure.  Swap block assignments will soon be allowed
  on vnodes for fast data caching.
sys/vm/swap_pager.c
sys/vm/swap_pager.h
sys/vm/vm_map.c
sys/vm/vm_object.c
sys/vm/vm_object.h