HomeFreeBSD

Centralize the logic in vfs_vmio_unwire() and sendfile_free_page().

Description

Centralize the logic in vfs_vmio_unwire() and sendfile_free_page().

Both of these functions atomically unwire a page, optionally attempt
to free the page, and enqueue or requeue the page. Add functions
vm_page_release() and vm_page_release_locked() to perform the same task.
The latter must be called with the page's object lock held.

As a side effect of this refactoring, the buffer cache will no longer
attempt to free mapped pages when completing direct I/O. This is
consistent with the handling of pages by sendfile(SF_NOCACHE).

Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D20986

Details

Provenance
markjAuthored on
Reviewer
alc
Differential Revision
D20986: Centralize the logic in vfs_vmio_unwire() and sendfile_free_page().
Parents
rS350430: seqc: add man page
Branches
Unknown
Tags
Unknown