kernel - Refactor vfs_cache ncp->nc_refs
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 27 Feb 2020 18:41:08 +0000 (10:41 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 29 Feb 2020 21:48:28 +0000 (13:48 -0800)
commitbc6d15e22d3b37df55df53412d6493ca8fa9b066
tree4a8fbac1e56113961a0a2d2d01f3bce0f09f5602
parent8251e43eeb9e30426f67f549001a077a32bd4269
kernel - Refactor vfs_cache ncp->nc_refs

* Refactor namecache->nc_refs to use atomic_fetchadd_int() instead
  of atomic_fcmp_set(), which really helps in heavily contended
  situations.

  This is accomplished by having a ref for every possible access point,
  so that the 1->0 transition can lead directly to termination without
  requiring further surgery.
sys/kern/vfs_cache.c