git: kernel - SWAP CACHE part 7/many - Add vm_swapcache.c core (write side)

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


commit 096e95c0a5baff85a63e1c94469fb3169dc7b081
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Feb 4 09:05:57 2010 -0800

    kernel - SWAP CACHE part 7/many - Add vm_swapcache.c core (write side)
    
    * Add vm_swapcache.c which will be responsible for assigning swap to clean
      vnode-backed VM pages and writing the data out.
    
      Implement a very simple inactive queue scanner and swap-writer for
      testing.
    
    * Track swap space use, split up into the piece used for anonymous
      data and the piece used for clean vnode-backed data.
    
    * Add PG_SWAPPED tracking for newly allocated VM pages via
      swap_pager_page_inserted().
    
    * Conditionalize the swap code's dirtying/undirtying of VM pages.  We
      don't want to mess with the dirty state when working the swap
      cache since it isn't the definitive backing store for the VM page.

Summary of changes:
 sys/conf/files        |    1 +
 sys/vm/swap_pager.c   |   86 +++++++++++++-----
 sys/vm/swap_pager.h   |    3 +
 sys/vm/vm_page.c      |    6 ++
 sys/vm/vm_swapcache.c |  231 +++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 304 insertions(+), 23 deletions(-)
 create mode 100644 sys/vm/vm_swapcache.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/096e95c0a5baff85a63e1c94469fb3169dc7b081


-- 
DragonFly BSD source repository





More information about the Commits mailing list