tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Remove vget from global namespace
With the global vnode cache there is no longer a need for vget() (take
the first reference on a vnode) to reside in global namespace.
1) Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.
2) Vget() increments the v_usecount before it checks the vnode is stable.
This behaviour makes it impossible to assert v_usecount being zero
or one as v_usecount also reflects other threads trying to vget().
Change vcache_vget() to increment v_holdcnt to prevent the vnode from
disappearing while vcache_vget() waits for a stable state and
free the vnode if this hold was the last reference to a reclaimed vnode.
3) Add some "v_usecount == 1" assertions.
Diffs are here: https://www.netbsd.org/~hannken/vget/
Comments or objections anyone?
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
Home |
Main Index |
Thread Index |
Old Index