Author: mjg
Date: Tue Jan  7 15:42:01 2020
New Revision: 356439
URL: https://svnweb.freebsd.org/changeset/base/356439

Log:
  vfs: use a dedicated counter for free vnode recycling
  
  Otherwise vlrureclaim activitity is mixed in and it is hard to tell which
  vnodes got reclaimed.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c    Tue Jan  7 09:02:14 2020        (r356438)
+++ head/sys/kern/vfs_subr.c    Tue Jan  7 15:42:01 2020        (r356439)
@@ -204,6 +204,10 @@ static counter_u64_t recycles_count;
 SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count,
     "Number of vnodes recycled to meet vnode cache targets");
 
+static counter_u64_t recycles_free_count;
+SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, 
&recycles_free_count,
+    "Number of free vnodes recycled to meet vnode cache targets");
+
 /*
  * Various variables used for debugging the new implementation of
  * reassignbuf().
@@ -603,6 +607,7 @@ vntblinit(void *dummy __unused)
 
        vnodes_created = counter_u64_alloc(M_WAITOK);
        recycles_count = counter_u64_alloc(M_WAITOK);
+       recycles_free_count = counter_u64_alloc(M_WAITOK);
        free_owe_inact = counter_u64_alloc(M_WAITOK);
 
        /*
@@ -1466,7 +1471,7 @@ vtryrecycle(struct vnode *vp)
                return (EBUSY);
        }
        if (!VN_IS_DOOMED(vp)) {
-               counter_u64_add(recycles_count, 1);
+               counter_u64_add(recycles_free_count, 1);
                vgonel(vp);
        }
        VOP_UNLOCK(vp);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to