cvs commit: src/sys/conf files src/sys/sys vnode.h src/sys/kern
vfs_hash.c
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 14 02:01:30 PST 2005
phk 2005-03-14 10:01:30 UTC
FreeBSD src repository
Modified files:
sys/conf files
sys/sys vnode.h
Added files:
sys/kern vfs_hash.c
Log:
Currently (almost) all filesystems maintain a local inode hash table
to get from (mount + inode) to vnode. These tables are mostly
copy&pasted from UFS, sized based on desiredvnodes and therefore
quite large (128K-512K). Several filesystems are buggy enough that
they allocate the hash table even before they know if they will
ever be used or not.
Add "vfs_hash", a system wide hash table, which will replace all
the per-filesystem hash-tables.
The fields we add to struct vnode will more or less be saved in
the respective filesystems inodes.
Having one central implementation will save code and will allow us
to justify the complexity of code to dynamically (re)size the hash
at a later point.
Revision Changes Path
1.1005 +1 -0 src/sys/conf/files
1.1 +184 -0 src/sys/kern/vfs_hash.c (new)
1.289 +12 -0 src/sys/sys/vnode.h
More information about the cvs-src
mailing list