git: 14babcc0815e - stable/14 - vfs: add max_vnlru_free to the vfs.vnode.vnlru tree
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Oct 2023 23:43:15 UTC
The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=14babcc0815e74079d608f4fe1bc1892107e08a5 commit 14babcc0815e74079d608f4fe1bc1892107e08a5 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-10-11 13:05:43 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-10-13 23:41:47 +0000 vfs: add max_vnlru_free to the vfs.vnode.vnlru tree While here rename the var internally. (cherry picked from commit 281a9715b582861fe4097c2f27eb27b208d752b1) --- 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);