Page MenuHomeFreeBSD

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

Authored by markj on Jul 18 2019, 4:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 31 2023, 8:57 PM
Unknown Object (File)
Nov 9 2023, 9:53 PM
Unknown Object (File)
Oct 8 2023, 8:54 PM
Unknown Object (File)
Sep 21 2023, 2:34 PM
Unknown Object (File)
Dec 22 2022, 11:47 PM
Subscribers
None

Details

Reviewers
None
Summary

These functions are similar and I would like to have their functionality
live in generic VM functions so that the details of vm_page
synchronization can be encapsulated in vm_page.c.

The change adds vm_page_release() and vm_page_release_locked(). They
both unwire the page and optionally attempt to free the page.
vm_page_release_locked() requires the object lock. The main difference
is that vfs_vmio_unwire() may attempt to free a mapped page, while
sendfile_free_page() does not. This change thus modifies the handling
of direct I/O and B_NOREUSE to avoid freeing a mapped page.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25396
Build 24031: arc lint + arc unit