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

git: kernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Feb 2010 23:59:13 -0800 (PST)

commit e9b560582904689977f992db6d5a91304b89ec4a
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Tue Feb 16 23:52:14 2010 -0800

    kernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.
    
    * Allow directory hierarchies to be selected for data caching when
      using vm.swapcache.data_enable.
    
    * Add the vm.swapcache.use_chflags sysctl which defaults to ON and
      enables use of the new chflags flags to determine what directory
      trees the swapcache will cache data from.
    
    * Add chflags cache and noscache.  The flags are tracked recursively
      by the namecache and do *NOT* have to be set recursively in the
      directory tree.  Setting a flag in a top-level directory is sufficient
      to cover the entire subtree.
    
      chflags cache -	Any regular file in the subtree will be cached
    			by swapcache.
    
      chflags noscache -	Disables any swapcacheing of data in the subtree,
    			overrides any use of chflags cache in the subtree.
    
      NOTE: Only applies to file data.  The caching of file meta-data by
      swapcache is controlled globally by vm.swapcache.meta_enable and
      ignores chflags flags..
    
    * Adjust the manual pages for swapcache and chflags.
    
    * NOTE! The default has been changed to require the use of chflags, data
      caching will not occur unless you either turn off the
      vm.swapcache.use_chflags sysctl (which enables data caching globally)
      or do something like 'chflags cache /'.  Of course vm.swapcache.read_enable
      must also be turned on for swapcache to cache file data.
    
    * NOTE! World must be rebuilt for libc, chflags, and ls to understand the
      new flags.

Summary of changes:
 lib/libc/gen/strtofflags.c |    7 +++++-
 share/man/man8/swapcache.8 |   46 ++++++++++++++++++++++++++++++++++++++++++-
 sys/kern/vfs_nlookup.c     |   42 ++++++++++++++++++++++++++++++++-------
 sys/kern/vfs_vnops.c       |   16 +++++++++++++++
 sys/sys/namecache.h        |    8 +++---
 sys/sys/nlookup.h          |    1 -
 sys/sys/stat.h             |    2 +
 sys/sys/vnode.h            |    3 +-
 sys/vm/vm_swapcache.c      |   23 +++++++++++++++++++--
 test/test/baaz             |    2 +
 usr.bin/chflags/chflags.1  |   39 ++++++++++++++++++++++++++++++++++++-
 11 files changed, 167 insertions(+), 22 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e9b560582904689977f992db6d5a91304b89ec4a


-- 
DragonFly BSD source repository



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