HomeFreeBSD

vm pager: writemapping accounting for OBJT_SWAP

Description

vm pager: writemapping accounting for OBJT_SWAP

Currently writemapping accounting is only done for vnode_pager which does
some accounting on the underlying vnode.

Extend this to allow accounting to be possible for any of the pager types.
New pageops are added to update/release writecount that need to be
implemented for any pager wishing to do said accounting, and we implement
these methods now for both vnode_pager (unchanged) and swap_pager.

The primary motivation for this is to allow other systems with OBJT_SWAP
objects to check if their objects have any write mappings 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.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D21456

Details

Provenance
kevansAuthored on
Reviewer
kib
Differential Revision
D21456: vm pager: writemapping accounting for OBJT_SWAP
Parents
rS351794: tests: shm_open(2): Verify FD_CLOEXEC
Branches
Unknown
Tags
Unknown