kernel - more SMP optimizations in the VM system
* imgact_elf - drop the vm_object a little earlier in load_section(),
and use a shared object lock when iterating ELF segments.
* When starting a vforked process use a shared process token to
interlock the wait loop instead of an exclusive token. Also don't
bother with the token if there's nothing to wait for.
* When forking, pre-assign lp2 thread's td_ucred.
* Remove the vp->v_object load check loop. It should not be possible
for vp->v_object to change after being assigned as long as the vp
is referenced.
* Replace most OBJ_DEAD tests with assertions that the flag is not set.
* Remove the VOLOCK/VOWANT vnode interlock. It shouldn't be possible
for the vnode's object to change while the vnode is ref'd. This was
a leftover from a long-ago time when vnodes were more persistent and
could be recycled and race accessors.
This also removes vm_object_dead_sleep/wait and related code.
* When memory mapping a vnode object there is no need to formally
hold and chain_wait the object. We can simply add a ref to it,
because vnode objects cannot have backing chains.
* When deallocating a vm_object we can shortcut counts greater than 1
for OBJT_VNODE objects instead of counts greater than 3.
* Optimize vnode_pager_alloc(), avoiding unnecessary locks. Keep the
temporary vnode token for the moment.
* Optimize vnode_pager_reference(), removing all locks from the path.