git: c1ffb1ffeeac - stable/14 - vfs: count calls to uma_reclaim in vnlru
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Oct 2023 23:43:17 UTC
The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ffb1ffeeac1b3968bf3eae5195b49e1c33b542 commit c1ffb1ffeeac1b3968bf3eae5195b49e1c33b542 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-10-11 22:48:03 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-10-13 23:41:48 +0000 vfs: count calls to uma_reclaim in vnlru (cherry picked from commit bb679b0c49094757f2aef3d8fe46c41dc8192fea) --- sys/kern/vfs_subr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d21ccb4251cd..01585ac9eefd 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1711,6 +1711,10 @@ vnlru_proc_light(void) return (true); } +static u_long uma_reclaim_calls; +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, uma_reclaim_calls, CTLFLAG_RD | CTLFLAG_STATS, + &uma_reclaim_calls, 0, "Number of calls to uma_reclaim"); + static void vnlru_proc(void) { @@ -1801,8 +1805,10 @@ vnlru_proc(void) * this happens. */ if (onumvnodes + VNLRU_COUNT_SLOP + 1000 > desiredvnodes && - numvnodes <= desiredvnodes) + numvnodes <= desiredvnodes) { + uma_reclaim_calls++; uma_reclaim(UMA_RECLAIM_DRAIN); + } if (done == 0) { if (force == 0 || force == 1) { force = 2;