git: 1fd80186c91d - main - Revert commit 1935cc945642 ("vfs: vntblinit(): Rework comments on...")
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 15 May 2025 14:28:04 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=1fd80186c91d847532e8354b81d03f17c9fcf650
commit 1fd80186c91d847532e8354b81d03f17c9fcf650
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-05-15 14:26:02 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-05-15 14:27:23 +0000
Revert commit 1935cc945642 ("vfs: vntblinit(): Rework comments on...")
This is because the Differential Revision tag was wrong. Will be recommitted shortly.
---
sys/kern/vfs_subr.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 769586ad0d6b..5fdd4b6c2474 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -757,15 +757,15 @@ vntblinit(void *dummy __unused)
int cpu, physvnodes, virtvnodes;
/*
- * 'desiredvnodes' is the minimum of a function of the physical memory
- * size and another of the kernel heap size (UMA limit, a portion of the
- * KVA).
- *
- * Currently, on 64-bit platforms, 'desiredvnodes' is set to
- * 'virtvnodes' up to a physical memory cutoff of ~1674MB, after which
- * 'physvnodes' applies instead. With the current automatic tuning for
- * 'maxfiles' (32 files/MB), 'desiredvnodes' becomes smaller than it at
- * ~5136MB.
+ * Desiredvnodes is a function of the physical memory size and the
+ * kernel's heap size. Generally speaking, it scales with the
+ * physical memory size. The ratio of desiredvnodes to the physical
+ * memory size is 1:16 until desiredvnodes exceeds 98,304.
+ * Thereafter, the
+ * marginal ratio of desiredvnodes to the physical memory size is
+ * 1:64. However, desiredvnodes is limited by the kernel's heap
+ * size. The memory required by desiredvnodes vnodes and vm objects
+ * must not exceed 1/10th of the kernel's heap size.
*/
physvnodes = maxproc + pgtok(vm_cnt.v_page_count) / 64 +
3 * min(98304 * 16, pgtok(vm_cnt.v_page_count)) / 64;