HomeFreeBSD

tmpfs: make vm_object point to the tmpfs node instead of vnode

Description

tmpfs: make vm_object point to the tmpfs node instead of vnode

The vnode could be reclaimed and allocated again during the lifecycle of
the node, but the node cannot. Also, referencing the node would allow
to reach it and tmpfs mount data from the object, regardless of the
state of the possibly absent vnode.

Still use swp_tmpfs for back-pointer, instead of using handle. Use of
named swap objects would incur taking the sw_alloc_sx on node allocation
and deallocation.

swp_tmpfs is renamed to swp_priv to remove the last bit of tmpfs in vm/.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37097

Details

Provenance
kibAuthored on Oct 20 2022, 12:00 PM
Reviewer
markj
Differential Revision
D37097: tmpfs: for used pages, account really allocated pages, instead of file sizes
Parents
rGbaa1ccceefdf: Make swap_pager_freespace() global
Branches
Unknown
Tags
Unknown