Changeset 2930 for trunk/src/lib/nt/kFsCache.h
- Timestamp:
- Sep 18, 2016, 5:57:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/kFsCache.h
r2912 r2930 48 48 /** @def KFSCACHE_CFG_PATH_HASH_TAB_SIZE 49 49 * Size of the path hash table. */ 50 #define KFSCACHE_CFG_PATH_HASH_TAB_SIZE 1638150 #define KFSCACHE_CFG_PATH_HASH_TAB_SIZE 99991 51 51 /** The max length paths we consider. */ 52 52 #define KFSCACHE_CFG_MAX_PATH 1024 … … 112 112 113 113 114 /**115 * Directory hash table entry.116 *117 * There can be two of these per directory entry when the short name differs118 * from the long name.119 */120 typedef struct KFSOBJHASH121 {122 /** Pointer to the next entry with the same hash. */123 PKFSOBJHASH pNext;124 /** Pointer to the object. */125 PKFSOBJ pObj;126 } KFSOBJHASH;127 128 114 129 115 /** Pointer to a user data item. */ … … 163 149 KU32 fFlags; 164 150 151 /** Hash value of the name inserted into the parent hash table. 152 * This is 0 if not inserted. Names are only hashed and inserted as they are 153 * first found thru linear searching of its siblings, and which name it is 154 * dependens on the lookup function (W or A) and whether the normal name or 155 * short name seems to have matched. 156 * 157 * @note It was ruled out as too much work to hash and track all four names, 158 * so instead this minimalist approach was choosen in stead. */ 159 KU32 uNameHash; 160 /** Pointer to the next child with the same name hash value. */ 161 PKFSOBJ pNextNameHash; 165 162 /** Pointer to the parent (directory). 166 163 * This is only NULL for a root. */ … … 231 228 KU32 cChildrenAllocated; 232 229 233 /** Pointer to the hash table. 234 * @todo this isn't quite there yet, structure wise. sigh. */ 235 PKFSOBJHASH paHashTab; 236 /** The size of the hash table. 237 * @remarks The hash table is optional and only used when there are a lot of 238 * entries in the directory. */ 239 KU32 cHashTab; 230 /** Pointer to the child hash table. */ 231 PKFSOBJ *papHashTab; 232 /** The mask shift of the hash table. 233 * Hash table size is a power of two, this is the size minus one. 234 * 235 * @remarks The hash table is optional and populated by lookup hits. The 236 * assumption being that a lookup is repeated and will choose a good 237 * name to hash on. We've got up to 4 different hashes, so this 238 * was the easy way out. */ 239 KU32 fHashTabMask; 240 240 241 241 /** Handle to the directory (we generally keep it open). */ … … 401 401 /** Number of hits walking the file system hierarchy. */ 402 402 KSIZE cWalkHits; 403 /** Number of child searches. */ 404 KSIZE cChildSearches; 405 /** Number of cChildLookups resolved thru hash table hits. */ 406 KSIZE cChildHashHits; 407 /** The number of child hash tables. */ 408 KSIZE cChildHashTabs; 409 /** The sum of all child hash table sizes. */ 410 KSIZE cChildHashEntriesTotal; 411 /** Number of children inserted into the hash tables. */ 412 KSIZE cChildHashed; 413 /** Number of collisions in the child hash tables */ 414 KSIZE cChildHashCollisions; 403 415 404 416 /** The root directory. */
Note:
See TracChangeset
for help on using the changeset viewer.