kernel - Cleanup vfs_lock & ref-count states states
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 22 Oct 2013 06:51:49 +0000 (23:51 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 22 Oct 2013 07:30:29 +0000 (00:30 -0700)
commit2097b3da24e5e213773d237633e6f0f5ff1a4148
tree316a06f58ee3273244f3994ab90e183adc622501
parent7a5c5bbba40449daad3a912121a2cccc91a81fc8
kernel - Cleanup vfs_lock & ref-count states states

* Clean up vp->v_state state transitions

* Fix bugs in the cachedvnodes counter tracking.  v_refcnt has to
  be masked against VREF_MASK to detect non-zero->0 and 0->non-zero
  transitions properly.

* Clear VREF_FINALIZE when reactivating a vnode in vget().

* vhold()/vdrop() no longer prevent a vnode from being moved to the
  vinactive list.  They simply prevent reclamation.

* Adjust the vnlru trigger points a bit.

* When cleaning, leave the vnode on the inactive list until we determine
  we can destroy it.  Add a ref instead of using the VREF_TERMINATE
  placeholding ref (since the vnode is still on the list).

* Implement vnode->v_act and remove the inactive mid-point stuff.  The
  now is that vnodes are selectively moved from the active list to
  the inactive list as needed.  Inactive vnodes are then cleaned up in order.

* Adjust hysteresis so that vnlru has a better chance of handling the
  vnode garbage collection before we forced it to be done synchronously
  in userexit.
sys/kern/vfs_lock.c
sys/kern/vfs_mount.c
sys/kern/vfs_subr.c
sys/sys/vnode.h