git: kernel - SWAP CACHE part 6/many - Refactor swap_pager_freespace()

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Feb 4 15:20:12 PST 2010


commit 8d292090b933bb902477afb2312e290b83bb7d16
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Feb 3 19:02:45 2010 -0800

    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.

Summary of changes:
 sys/vm/default_pager.c |    1 +
 sys/vm/device_pager.c  |    1 +
 sys/vm/phys_pager.c    |    1 +
 sys/vm/swap_pager.c    |  150 +++++++++++++++++++++++++++++++++---------------
 sys/vm/swap_pager.h    |    4 +-
 sys/vm/vm_object.c     |   23 +++++---
 sys/vm/vm_pager.c      |    1 +
 sys/vm/vnode_pager.c   |    2 +
 8 files changed, 127 insertions(+), 56 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8d292090b933bb902477afb2312e290b83bb7d16


-- 
DragonFly BSD source repository





More information about the Commits mailing list