diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2023-10-11 13:05:43 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2023-10-13 23:41:47 +0000 |
commit | 14babcc0815e74079d608f4fe1bc1892107e08a5 (patch) | |
tree | bb117af8b3ff23ecba6d66dad078adb6d51cbd5d | |
parent | cc2d62daa33935489235a4ef253ae61676baf7c4 (diff) | |
download | src-14babcc0815e74079d608f4fe1bc1892107e08a5.tar.gz src-14babcc0815e74079d608f4fe1bc1892107e08a5.zip |
vfs: add max_vnlru_free to the vfs.vnode.vnlru tree
While here rename the var internally.
(cherry picked from commit 281a9715b582861fe4097c2f27eb27b208d752b1)
-rw-r--r-- | sys/kern/vfs_subr.c | 12 |
1 files 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); |