HomeFreeBSD

vm_page_free_prep(): convert PG_ZERO zeroed page check to use sf_buf

Description

vm_page_free_prep(): convert PG_ZERO zeroed page check to use sf_buf

Make the check MI by allocating sf_buf in non-blockable manner. For
DMAP arches, this should be nop since sf_buf allocation cannot fail
trivially. For non-DMAP arches, we get the checks activated unless there
is serious sf_buf pressure, which typically should be not.

The context for vm_page_free_prep() should be ready to block on some VM
mutexes, which should make it reasonable to block on sf_buf list lock.

Move the code to INVARIANTS build from DIAGNOSTIC, and control its activation
with the sysctl debug.vm_check_pg_zero.

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

Details

Provenance
kibAuthored on Fri, Nov 21, 8:57 AM
Reviewer
markj
Differential Revision
D53850: More checks for PG_ZERO pages
Parents
rGb2b3d2a962eb: rtld-elf: move powerpc-specific auxv compat code into arch hook
Branches
Unknown
Tags
Unknown