[I intend to split the uipc_shm part out into a separate commit, but figured it was small enough to include here]
.
Currently writemapping accounting is only done for vnode_pager which does some accounting on the underlying vnode.
Extend this to allow accounting to be donepossible for any of the pager types. New pageops are added for thoseto update/release writecount that need specialized handling (e.g.to be implemented for any pager wishing to do said accounting, vnode_pager) with a defaultand we implementation to just add/remove to object->writemappings if these aren't provided these methods now for both vnode_pager (unchanged) and swap_pager.
The primary motivation for this is to allow other systems with OBJT_{DEFAULT,SWAP} objects to check if their objects have any write mappings available and reject operations with EBUSY if so. posixshm will be the first to do so in order to reject adding write seals to the shmfd if any writable mappings exist.