HomeFreeBSD

vm: Add a mode to vm_object_page_remove() which skips invalid pages

Description

vm: Add a mode to vm_object_page_remove() which skips invalid pages

This will be used to break a deadlock in ZFS between the per-mountpoint
teardown lock and page busy locks. In particular, when purging data
from the page cache during dataset rollback, we want to avoid blocking
on the busy state of invalid pages since the busying thread may be
blocked on the teardown lock in zfs_getpages().

Add a helper, vn_pages_remove_valid(), for use by filesystems. Bump
__FreeBSD_version so that the OpenZFS port can make use of the new
helper.

PR: 258208
Reviewed by: avg, kib, sef
Tested by: pho (part of a larger patch)
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d28af1abf031ee87a478b37180e3f0c518caedf6)

Details

Provenance
markjAuthored on Nov 15 2021, 4:44 PM
Parents
rG294965542720: Fix segment size in compressing core dumps
Branches
Unknown
Tags
Unknown