Module Name: src Committed By: ad Date: Fri Jan 17 22:26:26 UTC 2020
Modified Files: src/sys/fs/tmpfs [ad-namecache]: tmpfs_subr.c src/sys/kern [ad-namecache]: vfs_cache.c vfs_lookup.c src/sys/sys [ad-namecache]: namei.src vnode_impl.h src/sys/ufs/ffs [ad-namecache]: ffs_vfsops.c src/sys/ufs/ufs [ad-namecache]: ufs_vnops.c Log Message: vfs_lookup: - Do the easy component name lookups directly in the namecache without taking vnode locks nor vnode references (between the start and the leaf / parent), which seems to largely solve the lock contention problem with namei(). It needs support from the file system, which has to tell the name cache about directory permissions (only ffs and tmpfs tried so far), and I'm not sure how or if it can work with layered file systems yet. Work in progress. vfs_cache: - Make the rbtree operations more efficient: inline the lookup, and key on a 64-bit hash value (32 bits plus 16 bits length) rather than names. - Take namecache stuff out of vnode_impl, and take the rwlocks, and put them all together an an nchnode struct which is mapped 1:1: with vnodes. Saves memory and nicer cache profile. - Add a routine to help vfs_lookup do its easy component name lookups. - Report some more stats. - Tidy up the file a bit. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.105.2.1 src/sys/fs/tmpfs/tmpfs_subr.c cvs rdiff -u -r1.126.2.5 -r1.126.2.6 src/sys/kern/vfs_cache.c cvs rdiff -u -r1.212.4.2 -r1.212.4.3 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.47.2.3 -r1.47.2.4 src/sys/sys/namei.src cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/sys/sys/vnode_impl.h cvs rdiff -u -r1.362.4.1 -r1.362.4.2 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.248 -r1.248.2.1 src/sys/ufs/ufs/ufs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.