Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142943800
D50338.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
830 B
Referenced Files
None
Subscribers
None
D50338.diff
View Options
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1996,11 +1996,24 @@
mtx_lock(&vnode_list_mtx);
+ /*
+ * Reload 'numvnodes', as since we acquired the lock, it may have
+ * changed significantly if we waited, and 'rnumvnodes' above was only
+ * actually passed if 'bumped' is true (else it is 0).
+ */
+ rnumvnodes = atomic_load_long(&numvnodes);
+ if (rnumvnodes + !bumped < desiredvnodes) {
+ vn_alloc_cyclecount = 0;
+ mtx_unlock(&vnode_list_mtx);
+ goto alloc;
+ }
+
rfreevnodes = vnlru_read_freevnodes();
if (vn_alloc_cyclecount++ >= rfreevnodes) {
vn_alloc_cyclecount = 0;
vstir = true;
}
+
/*
* Grow the vnode cache if it will not be above its target max after
* growing. Otherwise, if there is at least one free vnode, try to
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 8:58 PM (4 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27934320
Default Alt Text
D50338.diff (830 B)
Attached To
Mode
D50338: vfs: vn_alloc(): Stop always calling vn_alloc_hard() and direct reclaiming
Attached
Detach File
Event Timeline
Log In to Comment