Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171734799
D2265.id4773.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
977 B
Referenced Files
None
Subscribers
None
D2265.id4773.diff
View Options
Index: sys/kern/vfs_subr.c
===================================================================
--- sys/kern/vfs_subr.c
+++ sys/kern/vfs_subr.c
@@ -322,11 +322,14 @@
* size. The memory required by desiredvnodes vnodes and vm objects
* may not exceed one seventh of the kernel's heap size.
*/
- physvnodes = maxproc + cnt.v_page_count / 16 + 3 * min(98304 * 4,
- cnt.v_page_count) / 16;
- virtvnodes = vm_kmem_size / (7 * (sizeof(struct vm_object) +
- sizeof(struct vnode)));
- desiredvnodes = min(physvnodes, virtvnodes);
+ TUNABLE_INT_FETCH("kern.maxvnodes", &desiredvnodes);
+ if (desiredvnodes == 0) {
+ physvnodes = maxproc + cnt.v_page_count / 16 + 3 *
+ min(98304 * 4, cnt.v_page_count) / 16;
+ virtvnodes = vm_kmem_size / (7 * (sizeof(struct vm_object) +
+ sizeof(struct vnode)));
+ desiredvnodes = min(physvnodes, virtvnodes);
+ }
if (desiredvnodes > MAXVNODES_MAX) {
if (bootverbose)
printf("Reducing kern.maxvnodes %d -> %d\n",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 3:31 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38884497
Default Alt Text
D2265.id4773.diff (977 B)
Attached To
Mode
D2265: kern.maxvnodes should be a tunable, and probably shouldn't be run-time modifiable
Attached
Detach File
Event Timeline
Log In to Comment