git: 455203ec8885 - stable/14 - VFS cache: Fix initial sizing for non-default 'ncsizefactor'
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 May 2025 17:38:04 UTC
The branch stable/14 has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=455203ec88850dfc776b932666ffe34e6f6e5619
commit 455203ec88850dfc776b932666ffe34e6f6e5619
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-05-01 10:30:49 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-05-08 17:30:58 +0000
VFS cache: Fix initial sizing for non-default 'ncsizefactor'
---
sys/kern/vfs_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index ab28540be8a8..6f92130e12b3 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2686,7 +2686,7 @@ nchinit(void *dummy __unused)
ncsize = desiredvnodes * ncsizefactor;
cache_recalc_neg_min();
- nchashtbl = nchinittbl(desiredvnodes * 2, &nchash);
+ nchashtbl = nchinittbl(ncsize, &nchash);
ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1;
if (ncbuckethash < 7) /* arbitrarily chosen to avoid having one lock */
ncbuckethash = 7;