Bug #2375
closedWishlist: tmpfs directory lookup optimization
100%
Description
tmpfs directories are structured as lists of directory entries; this leads to linear lookup costs. Directories with many files become fairly expensive to operate on.
http://leaf.dragonflybsd.org/~vsrinivas/tmpfs5.diff is a patch that introduces a 64-wide hash table (of lists) to speed up lookups. The patch is currently littered with debugging cruft and could benefit from cleaning.
http://leaf.dragonflybsd.org/~hofmann/tmpfs_rbtree.diff is a cleaner patch that uses an RB-tree, keyed on the name of the file in question.
Both approaches are solid improvements over the current lists, but could use some testing (benchmarking) to determine which is worth applying. The hash list patch has had many hours of fsstress testing; it now works well. The tree patches at the same points.