kernel - Add frontend cache for cache_findmount()
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Feb 2013 04:32:03 +0000 (20:32 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Feb 2013 04:32:03 +0000 (20:32 -0800)
commit07baed26dd284572e0253aef3527c82a999438c3
treed1ed3c8b3bebb9f602d3214cb535ace05f6b5c83
parentddb06db22c9a473b5bbb374b988cd074eda75a80
kernel - Add frontend cache for cache_findmount()

* When a name lookup crosses a mount point boundary it must call
  cache_findmount() to locate the mount linkage.  This linkage is
  not stored in the vp or ncp because there is a 1:N relationship
  between vp/ncp and possible mounts due to DragonFly's ability
  to do arbitrary nullfs mounts in the topology.

* The mountlist scan requires an exclusive token to deal with ripouts
  during the scan.  This creates a bottleneck when highly parallel
  filesystem operations are being run on the machine and use mount-crossing
  paths or absolute paths.

* The frontend cache is able to use a shared spinlock for the fast path,
  and implements a simple non-chained linear array hashed by pointer
  values.
sys/kern/vfs_cache.c
sys/kern/vfs_syscalls.c
sys/sys/namecache.h