git: 281a9715b582 - main - vfs: add max_vnlru_free to the vfs.vnode.vnlru tree
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Oct 2023 13:07:27 UTC
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=281a9715b582861fe4097c2f27eb27b208d752b1
commit 281a9715b582861fe4097c2f27eb27b208d752b1
Author: Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-10-11 13:05:43 +0000
Commit: Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-10-11 13:07:13 +0000
vfs: add max_vnlru_free to the vfs.vnode.vnlru tree
While here rename the var internally.
---
sys/kern/vfs_subr.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 99933a6b9c88..d21ccb4251cd 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1306,9 +1306,11 @@ next_iter:
return (done);
}
-static int max_vnlru_free = 10000; /* limit on vnode free requests per call */
-SYSCTL_INT(_debug, OID_AUTO, max_vnlru_free, CTLFLAG_RW, &max_vnlru_free,
- 0,
+static int max_free_per_call = 10000;
+SYSCTL_INT(_debug, OID_AUTO, max_vnlru_free, CTLFLAG_RW, &max_free_per_call, 0,
+ "limit on vnode free requests per call to the vnlru_free routine (legacy)");
+SYSCTL_INT(_vfs_vnode_vnlru, OID_AUTO, max_free_per_call, CTLFLAG_RW,
+ &max_free_per_call, 0,
"limit on vnode free requests per call to the vnlru_free routine");
/*
@@ -1323,8 +1325,8 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp)
bool retried;
mtx_assert(&vnode_list_mtx, MA_OWNED);
- if (count > max_vnlru_free)
- count = max_vnlru_free;
+ if (count > max_free_per_call)
+ count = max_free_per_call;
if (count == 0) {
mtx_unlock(&vnode_list_mtx);
return (0);