git: 46d5611b8796 - stable/13 - vfs: count calls to uma_reclaim in vnlru
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Oct 2023 23:54:00 UTC
The branch stable/13 has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=46d5611b8796328b4e326c319cd896f6cd1600f4
commit 46d5611b8796328b4e326c319cd896f6cd1600f4
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:48:14 +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 a8e4714a7a79..2be83da5d73f 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1728,6 +1728,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)
{
@@ -1818,8 +1822,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;