Subject: CVS commit: syssrc/sys
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 12/08/2001 06:10:01
Module Name: syssrc
Committed By: lukem
Date: Sat Dec 8 04:10:00 UTC 2001
Modified Files:
syssrc/sys/kern: vfs_lookup.c
syssrc/sys/nfs: nfs_vnops.c
syssrc/sys/sys: namei.h
Log Message:
- Implement
uint32_t namei_hash(const char *p, const char **ep)
which determines the equivalent MI hash32_str() hash for p.
If *ep != NULL, calculate the hash to the character before ep.
If *ep == NULL, calculate the has to the first / or NUL found, and
point *ep to that location.
- Use namei_hash() to calculate cn_hash in lookup() and relookup().
Hash distribution goes from 35-40% to 55-70%, with similar profiled
time spent in cache_lookup() and cache_enter() on my P3-600.
- Use namei_hash() to calculate cn_hash in nfs_readdirplusrpc(),
insetad of homegrown code (that differed from that in lookup() !)
namei_hash() has better spread and is faster than previous code
(which used a non-constant multiplication).
To generate a diff of this commit:
cvs rdiff -r1.38 -r1.39 syssrc/sys/kern/vfs_lookup.c
cvs rdiff -r1.146 -r1.147 syssrc/sys/nfs/nfs_vnops.c
cvs rdiff -r1.24 -r1.25 syssrc/sys/sys/namei.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.