HomeFreeBSD

Add OBJT_SWAP_TMPFS pager

Description

Add OBJT_SWAP_TMPFS pager

This is OBJT_SWAP pager, specialized for tmpfs. Right now, both swap pager
and generic vm code have to explicitly handle swap objects which are tmpfs
vnode v_object, in the special ways. Replace (almost) all such places with
proper methods.

Since VM still needs a notion of the 'swap object', regardless of its
use, add yet another type-classification flag OBJ_SWAP. Set it in
vm_object_allocate() where other type-class flags are set.

This change almost completely eliminates the knowledge of tmpfs from VM,
and opens a way to make OBJT_SWAP_TMPFS loadable from tmpfs.ko.

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

Details

Provenance
kibAuthored on May 1 2021, 1:18 AM
Reviewer
markj
Differential Revision
D30070: vm: streamline uses of OBJT_SWAP and tmpfs swap objects
Parents
rG0d2dfc6fed03: pagertab: use designated initializers
Branches
Unknown
Tags
Unknown