HomeFreeBSD

sysctl vm.objects: report backing object and swap use

Description

sysctl vm.objects: report backing object and swap use

For anonymous objects, provide a handle kvo_me naming the object,
and report the handle of the backing object. This allows userspace
to deconstruct the shadow chain. Right now the handle is the address
of the object in KVA, but this is not guaranteed.

For the same anonymous objects, report the swap space used for actually
swapped out pages, in kvo_swapped field. I do not believe that it is
useful to report full 64bit counter there, so only uint32_t value is
returned, clamped to the max.

For kinfo_vmentry, report anonymous object handle backing the entry,
so that the shadow chain for the specific mapping can be deconstructed.

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

Details

Provenance
kibAuthored on Apr 15 2021, 9:27 AM
Reviewer
markj
Differential Revision
D29771: sysctl vm.objects: report backing object and swap use
Parents
rG4342ba184c15: sysctl_handle_string: do not malloc when SYSCTL_IN cannot fault
Branches
Unknown
Tags
Unknown