git: 564cd5a91540 - stable/13 - vfs cache: Drop known argument of internal cache_recalc_neg_min()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Oct 2023 23:53:45 UTC
The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=564cd5a91540246ab13f8dd3cbc3058264c06755 commit 564cd5a91540246ab13f8dd3cbc3058264c06755 Author: Olivier Certner <olce.freebsd@certner.fr> AuthorDate: 2023-09-22 21:25:41 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-10-13 23:48:11 +0000 vfs cache: Drop known argument of internal cache_recalc_neg_min() 'ncnegminpct' is to be passed always, so just drop the unneeded parameter. Sponsored by: The FreeBSD Foundation Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D41763 (cherry picked from commit 02ef039c284b8a7b1ea40f5f9a851a3cb6af5b31) --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index a50e8010fb88..a98b0e5ce411 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -994,10 +994,10 @@ SYSCTL_PROC(_vfs_cache, OID_AUTO, nchstats, CTLTYPE_OPAQUE | CTLFLAG_RD | "VFS cache effectiveness statistics"); static void -cache_recalc_neg_min(u_int val) +cache_recalc_neg_min(void) { - neg_min = (ncsize * val) / 100; + neg_min = (ncsize * ncnegminpct) / 100; } static int @@ -1016,7 +1016,7 @@ sysctl_negminpct(SYSCTL_HANDLER_ARGS) if (val < 0 || val > 99) return (EINVAL); ncnegminpct = val; - cache_recalc_neg_min(val); + cache_recalc_neg_min(); return (0); } @@ -2656,7 +2656,7 @@ nchinit(void *dummy __unused) VFS_SMR_ZONE_SET(cache_zone_large_ts); ncsize = desiredvnodes * ncsizefactor; - cache_recalc_neg_min(ncnegminpct); + cache_recalc_neg_min(); nchashtbl = nchinittbl(desiredvnodes * 2, &nchash); ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1; if (ncbuckethash < 7) /* arbitrarily chosen to avoid having one lock */ @@ -2800,7 +2800,7 @@ cache_changesize(u_long newmaxvnodes) } } ncsize = newncsize; - cache_recalc_neg_min(ncnegminpct); + cache_recalc_neg_min(); cache_changesize_set_new(new_nchashtbl, new_nchash); cache_unlock_all_buckets(); cache_unlock_all_vnodes();