cvs commit: src/lib/libkvm kvm_util.c Makefile kvm.h src/sys/kern vfs_cache.c src/sys/sys nchstats.h globaldata.h namei.h src/sys/vfs/gnu/ext2fs ext2_lookup.c src/sys/vfs/isofs/cd9660 cd9660_lookup.c src/sys/vfs/udf udf_vnops.c src/sys/vfs/ufs ...

Hiten Pandya hmp at crater.dragonflybsd.org
Thu Apr 1 21:47:25 PST 2004


hmp         2004/04/01 21:46:03 PST

DragonFly src repository

  Modified files:
    lib/libkvm           Makefile kvm.h 
    sys/kern             vfs_cache.c 
    sys/sys              globaldata.h namei.h 
    sys/vfs/gnu/ext2fs   ext2_lookup.c 
    sys/vfs/isofs/cd9660 cd9660_lookup.c 
    sys/vfs/udf          udf_vnops.c 
    sys/vfs/ufs          ufs_lookup.c 
    usr.bin/systat       vmstat.c 
    usr.bin/vmstat       vmstat.c 
  Added files:
    lib/libkvm           kvm_util.c 
    sys/sys              nchstats.h 
    test/pcpu            Makefile ncache-stats.c 
  Log:
  Per-CPU VFS Namecache Effectiveness Statistics:
  
  	* Convert nchstats into a CPU indexed array
  
  	* Export the per-CPU nchstats as a sysctl vfs.cache.nchstats
  	  and let user-land aggregate them.
  
  	* Add a function called kvm_nch_cpuagg() to libkvm; it is
  	  shared by systat(1) and vmstat(1) and the ncache-stats test
  	  program.  As the function name suggests, it aggregates
  	  the per-CPU nchstats.
  
  	* Move struct nchstats into a separate header to avoid
  	  header file namespace pollution; sys/nchstats.h.
  
  	* Keep a cached copy of the globaldata pointer in the VFS
  	  specific LOOKUP op, and use that to increment the
  	  namecache effectiveness counters (nchstats).
  
  	* Modify systat(1) and vmstat(1) to accomodate the new
  	  behavior of accessing nchstats.  Remove a (now) redundant
  	  sysctl to get the cpu count (hw.ncpu), instead we just divide
  	  the total length of the nchstats array returned by sysctl
  	  by sizeof(struct nchstats) to get the CPU count.
  
  	* Garbage-collect unused variables and fix nearby warnings
  	  in systat(1) an vmstat(1).
  
  	* Add a very-cool test program, that prints the nchstats
  	  per-CPU statistics to show CPU distribution.  Here is the
  	  output it generates on an 2-processor SMP machine:
  
  	  gray# ncache-stats
  	  VFS Name Cache Effectiveness Statistics
    	  4207370 total name lookups
  	  COUNTER             CPU-1       CPU-2           TOTAL
  	  goodhits            2477657     1060677         (3538334  )
  	  neghits             107531      47294           (154825   )
  	  badhits             28968       7720            (36688    )
  	  falsehits           0           0               (0        )
  	  misses              339671      137852          (477523   )
  	  longnames           0           0               (0        )
  	  passes 2            13104       6813            (19917    )
  	  2-passes            25134       15257           (40391    )
  
  The SMP machine used for testing this commit was proudly presented
  by David Rhodus <drhodus at xxxxxxxxxxxxxxxx>.
  
  Reviewed-by:	Matthew Dillon <dillon at xxxxxxxxxxxxx>
  
  Revision  Changes    Path
  1.3       +2 -2      src/lib/libkvm/Makefile
  1.5       +2 -0      src/lib/libkvm/kvm.h
  1.14      +45 -10    src/sys/kern/vfs_cache.c
  1.31      +4 -0      src/sys/sys/globaldata.h
  1.11      +7 -16     src/sys/sys/namei.h
  1.10      +3 -2      src/sys/vfs/gnu/ext2fs/ext2_lookup.c
  1.10      +3 -2      src/sys/vfs/isofs/cd9660/cd9660_lookup.c
  1.4       +3 -2      src/sys/vfs/udf/udf_vnops.c
  1.10      +3 -2      src/sys/vfs/ufs/ufs_lookup.c
  1.7       +27 -6     src/usr.bin/systat/vmstat.c
  1.10      +27 -8     src/usr.bin/vmstat/vmstat.c


http://www.dragonflybsd.org/cvsweb/src/lib/libkvm/Makefile.diff?r1=1.2&r2=1.3&f=h
http://www.dragonflybsd.org/cvsweb/src/lib/libkvm/kvm.h.diff?r1=1.4&r2=1.5&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_cache.c.diff?r1=1.13&r2=1.14&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/globaldata.h.diff?r1=1.30&r2=1.31&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/namei.h.diff?r1=1.10&r2=1.11&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/gnu/ext2fs/ext2_lookup.c.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/isofs/cd9660/cd9660_lookup.c.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/udf/udf_vnops.c.diff?r1=1.3&r2=1.4&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ufs_lookup.c.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/usr.bin/systat/vmstat.c.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/usr.bin/vmstat/vmstat.c.diff?r1=1.9&r2=1.10&f=h





More information about the Commits mailing list