Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Apr 2009 20:58:56 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern vfs_cache.c
Message-ID:  <200904072059.n37Kx3i5085041@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2009-04-07 20:58:56 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             vfs_cache.c 
  Log:
  SVN rev 190829 on 2009-04-07 20:58:56Z by rwatson
  
  Nul-terminate strings in the VFS name cache, which negligibly change
  the size and cost of name cache entries, but make adding debugging
  and tracing easier.
  
  Add SDT DTrace probes for various namecache events:
  
    vfs:namecache:enter:done - new entry in the name cache, passed parent
      directory vnode pointer, name added to the cache, and child vnode
      pointer.
  
    vfs:namecache:enter_negative:done - new negative entry in the name cache,
      passed parent vnode pointer, name added to the cache.
  
    vfs:namecache:fullpath:enter - call to vn_fullpath1() is made, passed
      the vnode to resolve to a name.
  
    vfs:namecache:fullpath:hit - vn_fullpath1() successfully resolved a
      search for the parent of an object using the namecache, passed the
      discovered parent directory vnode pointer, name, and child vnode
      pointer.
  
    vfs:namecache:fullpath:miss - vn_fullpath1() failed to resolve a search
      for the parent of an object using the namecache, passed the child
      vnode pointer.
  
    vfs:namecache:fullpath:return - vn_fullpath1() has completed, passed the
      error number, and if that is zero, the vnode to resolve, and the
      returned path.
  
    vfs:namecache:lookup:hit - postive name cache entry hit, passed the
      parent directory vnode pointer, name, and child vnode pointer.
  
    vfs:namecache:lookup:hit_negative - negative name cache entry hit,
      passed the parent directory vnode pointer and name.
  
    vfs:namecache:lookup:miss - name cache miss, passed the parent directory
      pointer and the full remaining component name (not terminated after the
      cache miss component).
  
    vfs:namecache:purge:done - name cache purge for a vnode, passed the vnode
      pointer to purge.
  
    vfs:namecache:purge_negative:done - name cache purge of negative entries
      for children of a vnode, passed the vnode pointer to purge.
  
    vfs:namecache:purgevfs - name cache purge for a mountpoint, passed the
      mount pointer.  Separate probes will also be invoked for each cache
      entry zapped.
  
    vfs:namecache:zap:done - name cache entry zapped, passed the parent
      directory vnode pointer, name, and child vnode pointer.
  
    vfs:namecache:zap_negative:done - negative name cache entry zapped,
      passed the parent directory vnode pointer and name.
  
  For any probes involving an extant name cache entry (enter, hit, zapp),
  we use the nul-terminated string for the name component.  For misses,
  the remainder of the path, including later components, is provided as
  an argument instead since there is no handy nul-terminated version of
  the string around.  This is arguably a bug.
  
  MFC after:      1 month
  Sponsored by:   Google, Inc.
  Reviewed by:    jhb, kan, kib (earlier version)
  
  Revision  Changes    Path
  1.148     +96 -10    src/sys/kern/vfs_cache.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904072059.n37Kx3i5085041>