kernel - Temporary work-around for vnode recyclement problems
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Apr 2022 05:19:28 +0000 (22:19 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Apr 2022 05:19:28 +0000 (22:19 -0700)
commit83fe95c9cf271e44613cd1c88bc48397c8be7513
tree52814291c96e954e9cc9878c20a8d8cb180d5c27
parent55d906d5ce1b03c05b15bad1e2e2624c01f6c4fa
kernel - Temporary work-around for vnode recyclement problems

* vnlru deadlocks were encountered on grok while indexing ~20 million
  files in deep directory trees.

* Add vfscache_unres accounting to keep track of unresolved ncp's
  at the leaves of the namecache tree.  Start trimming the namecache
  when the unres leaf count exceeds 1/16 maxvnodes, in addition to
  the other algorithms.

* Add code in vnlru to decomission vnodes with children in the namecache
  when those children are trivial (e.g. unresolved, dead, or negative
  entries that can be easily locked).
sys/kern/vfs_cache.c
sys/kern/vfs_mount.c