The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/coda/coda_opstats.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * 
    3  *             Coda: an Experimental Distributed File System
    4  *                              Release 3.1
    5  * 
    6  *           Copyright (c) 1987-1998 Carnegie Mellon University
    7  *                          All Rights Reserved
    8  * 
    9  * Permission  to  use, copy, modify and distribute this software and its
   10  * documentation is hereby granted,  provided  that  both  the  copyright
   11  * notice  and  this  permission  notice  appear  in  all  copies  of the
   12  * software, derivative works or  modified  versions,  and  any  portions
   13  * thereof, and that both notices appear in supporting documentation, and
   14  * that credit is given to Carnegie Mellon University  in  all  documents
   15  * and publicity pertaining to direct or indirect use of this code or its
   16  * derivatives.
   17  * 
   18  * CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS  KNOWN  TO  HAVE  BUGS,
   19  * SOME  OF  WHICH MAY HAVE SERIOUS CONSEQUENCES.  CARNEGIE MELLON ALLOWS
   20  * FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.   CARNEGIE  MELLON
   21  * DISCLAIMS  ANY  LIABILITY  OF  ANY  KIND  FOR  ANY  DAMAGES WHATSOEVER
   22  * RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE  OR  OF
   23  * ANY DERIVATIVE WORK.
   24  * 
   25  * Carnegie  Mellon  encourages  users  of  this  software  to return any
   26  * improvements or extensions that  they  make,  and  to  grant  Carnegie
   27  * Mellon the rights to redistribute these changes without encumbrance.
   28  * 
   29  *      @(#) src/sys/coda/coda_opstats.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ 
   30  * $FreeBSD: releng/6.2/sys/coda/coda_opstats.h 139745 2005-01-05 23:35:00Z imp $
   31  * 
   32  */
   33 
   34 /*
   35  * operation stats: what the minicache can intercept that
   36  * *isn't* seen by venus.  These stats are kept to augment
   37  * the stats maintained by the Volume-Session mechanism.
   38  */
   39 
   40 /* vfsops:
   41  *          mount: not currently bounced to Venus
   42  *          umount: nope
   43  *          root: only first call, rest is cached.
   44  *          statfs: none (bogus)
   45  *          sync: none (bogus)
   46  *          vget: all
   47  */
   48 
   49 #define CODA_MOUNT_STATS  0
   50 #define CODA_UMOUNT_STATS 1
   51 #define CODA_ROOT_STATS   2
   52 #define CODA_STATFS_STATS 3
   53 #define CODA_SYNC_STATS   4
   54 #define CODA_VGET_STATS   5
   55 #define CODA_VFSOPS_SIZE  6
   56 
   57 /* vnodeops:
   58  *            open: all to venus
   59  *            close: all to venus
   60  *            rdrw: bogus.  Maybe redirected to UFS.
   61  *                          May call open/close for internal opens/closes
   62  *                          (Does exec not call open?)
   63  *            ioctl: causes a lookupname
   64  *                   passes through
   65  *            select: can't get there from here.
   66  *            getattr: can be satsified by cache
   67  *            setattr: all go through
   68  *            access: can be satisfied by cache
   69  *            readlink: can be satisfied by cache
   70  *            fsync: passes through
   71  *            inactive: passes through
   72  *            lookup: can be satisfied by cache
   73  *            create: passes through
   74  *            remove: passes through
   75  *            link: passes through
   76  *            rename: passes through
   77  *            mkdir: passes through
   78  *            rmdir: passes through
   79  *            symlink: passes through
   80  *            readdir: may be redirected to UFS
   81  *                     may cause an "internal" open/close
   82  */
   83 
   84 #define CODA_OPEN_STATS     0
   85 #define CODA_CLOSE_STATS    1
   86 #define CODA_RDWR_STATS     2
   87 #define CODA_IOCTL_STATS    3
   88 #define CODA_SELECT_STATS   4
   89 #define CODA_GETATTR_STATS  5
   90 #define CODA_SETATTR_STATS  6
   91 #define CODA_ACCESS_STATS   7
   92 #define CODA_READLINK_STATS 8
   93 #define CODA_FSYNC_STATS    9
   94 #define CODA_INACTIVE_STATS 10
   95 #define CODA_LOOKUP_STATS   11
   96 #define CODA_CREATE_STATS   12
   97 #define CODA_REMOVE_STATS   13
   98 #define CODA_LINK_STATS     14
   99 #define CODA_RENAME_STATS   15
  100 #define CODA_MKDIR_STATS    16
  101 #define CODA_RMDIR_STATS    17
  102 #define CODA_SYMLINK_STATS  18
  103 #define CODA_READDIR_STATS  19
  104 #define CODA_VNODEOPS_SIZE  20
  105 
  106 /*
  107  * I propose the following structres:
  108  */
  109 
  110 struct coda_op_stats {
  111     int opcode;       /* vfs opcode */
  112     long entries;     /* number of times call attempted */
  113     long sat_intrn;   /* number of times call satisfied by cache */
  114     long unsat_intrn; /* number of times call failed in cache, but
  115                          was not bounced to venus proper. */
  116     long gen_intrn;   /* number of times call generated internally */
  117                       /* (do we need that?) */
  118 };
  119 
  120 /*
  121  * With each call to the minicache, we'll bump the counters whenver
  122  * a call is satisfied internally (through the cache or through a
  123  * redirect), and whenever an operation is caused internally.
  124  * Then, we can add the total operations caught by the minicache
  125  * to the world-wide totals, and leave a caveat for the specific
  126  * graphs later.
  127  */

Cache object: f180d3bf156ac8edbd8093542ca43c4f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.