Lines Matching defs:cache

27  *  file systems to share a common cache.  While this consisted primarily
49 #define ICACHE_SIZE 350 /* Max number of I-node in file cache */
62 typedef struct cache { /* Generic cache element: */
63 struct cache *link[4]; /* .. Fwd/Bak links for hash chain & LRU */
64 struct cache **chn; /* .. Hash chain link */
70 typedef struct head { /* Generic cache header: */
73 int size; /* .. Size of "cache" objects */
76 int hits; /* .. Total cache hits */
81 /* Constructor for cache headers: */
85 int read_opt; /* Number of times cache was bypassed */
99 * Search cache:
101 * The caller pass a pointer to the first "cache" object in the current
102 * hash chain ["cap"] and a pointer to the corresponding cache header
103 * ["chp"]. This routine follows the cache chain until it finds an
105 * and the cache-specific comparison ["chp->cmp"].
107 * Returns the address of the matching cache object or null if there
113 * Check all entries on the cache chain. We expect
120 * to the front of the cache header's LRU list
145 * Reclaim a cache element:
148 * the cache headed at "chp" and return the address of the
150 * elements on the cache headed at "chp" that belong to the
158 * We follow the cache's LRU chain from oldest to
206 * Install a cache element:
208 * The caller passes the address of cache descriptor ["chp"] and the
212 * from the cache), links it into the indicated hash chain, and returns
220 * We haven't reached the maximum cache size yet.
222 * cache.
232 * remove the oldest element from the cache. This
255 * This cache (also known as the inode cache) is used to keep track of all
257 * a cache entry is the file reference number which is file-system dependent
261 typedef struct icache { /* Inode cache element: */
287 * This routine searches the file cache looking for the entry bound to
308 * "*ip" in the inode cache where it may be retrieved by
326 * will return 1 if the entry could not be entered into the cache
346 * This cache is designed to speed directory searches. Each entry cor-
353 typedef struct dcache { /* Directory cache objects: */
382 * This routine searches the directory cache for an entry
405 * This routine creates directory cache entries to be retrieved later
406 * via "get_dcache". The cache key is composed of three parts: The
420 * "cache_t" struct. Also fill in the cache-specific
434 prom_panic("no memory for directory cache");
446 * the cache without a purge.
461 prom_panic("no memory for directory cache");
468 * "cache_t" struct. Also fill in the cache-specific
484 typedef struct bcache { /* Disk block cache objects: */
531 * cache. If the read fails, we return a non-zero value.
583 * Reclaim all cache entries:
586 * removes all cache entries associated with that file system from the
587 * global cache and release any resources bound to said entrires.
615 printf("%s cache:\n", tag[j]);
619 printf(" cache hits %d\n", hp->hits);
620 printf(" cache purges %d\n", hp->purges);