DragonFly BSD
DragonFly commits List (threaded) for 2010-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Refactor vnode_free_list, vnode reuse algorithm


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 07:54:50 -0800 (PST)

commit 04bd6171a2376758dca089a0ac0148432e60ebfc
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Mon Feb 22 07:40:05 2010 -0800

    kernel - Refactor vnode_free_list, vnode reuse algorithm
    
    * Rip out most of he VAGEx stuff.  It might come back in another form
      later.
    
    * Split the vnode_free_list into three parts, separated by two markers
      (vnode_free_mid1 and vnode_free_mid2).
    
    * Insert vnodes on the free list based on the following.  New vnodes
      are allocated from the base of the list.
    
      At the HEAD		- If the vnode is VRECLAIMED (i.e. dead)
      end of first section	- If the vnode has no cached VM or SWAP data
      end of second section	- If the vnode has cached SWAP data and no cached VM
      at the TAIL		- If the vnode has cached VM data
    
    * Implement a rover to slowly scan vnodes in the list when allocating
      and shift them to the appropriate section.  This fixes a degenerate
      condition in the placement of the markers.
    
    * A Vnode is removed and usually immediately reinserted whenever it
      is accesesd by userland but not held open, giving us a LRU-like
      algorithm within each section of the list but non-LRU-like transits
      between sections of the list.
    
      Transits between sections are determined more by how the VM system
      recycles related VM cache pages.  Cached SWAP data only occurs if
      the swapcache is turned on.
    
    * Future: Might use VAGE to implement a second go-around in the queue
      or a burst re-placement in the queue when the data set is found to
      be too big to fit.

Summary of changes:
 sys/kern/vfs_lock.c |   97 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 90 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/04bd6171a2376758dca089a0ac0148432e60ebfc


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]