kernel - Implementat much deeper use of shared VM object locks
* Use a shared VM object lock on terminal (and likely highly shared)
OBJT_VNODE objects. For example, binaries in the system such as
/bin/sh or /usr/bin/make.
This greatly improves fork/exec and related VM faults on concurrently
executing binaries. Most commonly, parallel builds often exec
hundreds of thousands of sh's and make's.
+50% to +100% nominal improved performance under these conditions.
+200% to +300% improved poudriere performance during the depend
stage.
* Formalize the shared VM object lock with a new API function,
vm_object_lock_maybe_shared(), which determines whether a VM
object meets the requirements for obtaining a shared lock.
* Adjust the vm_fault*() APIs to track whether the VM object is
locked shared or exclusive on entry.
* Clarify that OBJ_ONEMAPPING is only applicable to OBJT_DEFAULT
and OBJT_SWAP objects.
* Heavy work on the exec path. Somewhat lighter work on the exit
path. Tons more work could be done.