aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-01-11 22:58:14 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-01-11 22:58:14 +0000
commitb52d50cf69d9b2a465ad7cb6ce60bda3dc800346 (patch)
tree1e466c22d4704fa12b10f94e62d3259c3d059510 /sys/sys/proc.h
parent69283067644a63781f51e9b9d51135e25aa9a601 (diff)
downloadsrc-b52d50cf69d9b2a465ad7cb6ce60bda3dc800346.tar.gz
src-b52d50cf69d9b2a465ad7cb6ce60bda3dc800346.zip
vfs: prealloc vnodes in getnewvnode_reserve
Having a reserved vnode count does not guarantee that getnewvnodes wont block later. Said blocking partially defeats the purpose of reserving in the first place. Preallocate instaed. The only consumer was always passing "1" as count and never nesting reservations.
Notes
Notes: svn path=/head/; revision=356643
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 64605b174733..2a85b035a7b4 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -297,7 +297,7 @@ struct thread {
struct osd td_osd; /* (k) Object specific data. */
struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */
pid_t td_dbg_forked; /* (c) Child pid for debugger. */
- u_int td_vp_reserv; /* (k) Count of reserved vnodes. */
+ struct vnode *td_vp_reserved;/* (k) Prealloated vnode. */
u_int td_no_sleeping; /* (k) Sleeping disabled count. */
void *td_su; /* (k) FFS SU private */
sbintime_t td_sleeptimo; /* (t) Sleep timeout. */