git: kernel - SWAP CACHE part 1/many - Convert swblock to a Red-Black tree
dillon at crater.dragonflybsd.org
Wed Feb 3 11:06:57 PST 2010
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Feb 2 20:36:21 2010 -0800
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
* 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.
Summary of changes:
sys/vm/swap_pager.c | 250 +++++++++++++++++++++-----------------------------
sys/vm/swap_pager.h | 3 +-
sys/vm/vm_map.c | 8 +-
sys/vm/vm_object.c | 2 +
sys/vm/vm_object.h | 29 ++++---
5 files changed, 129 insertions(+), 163 deletions(-)
DragonFly BSD source repository
More information about the Commits