HomeFreeBSD

vm: Honour the "noreuse" flag to vm_page_unwire_managed()

Description

vm: Honour the "noreuse" flag to vm_page_unwire_managed()

This flag indicates that the page should be enqueued near the head of
the inactive queue, skipping the LRU queue. It is used when unwiring
pages from the buffer cache following direct I/O or after I/O when
POSIX_FADV_NOREUSE or _DONTNEED advice was specified, or when
sendfile(SF_NOCACHE) completes. For the direct I/O and sendfile cases
we only enqueue the page if we decide not to free it, typically because
it's mapped.

Pass "noreuse" through to vm_page_release_toq() so that we actually
honour the desired LRU policy for these scenarios.

Approved by: re (kib)
Reported by: bdrewery
Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D28555

(cherry picked from commit 5c18744ea9b94cb6a9a091a900fa4999868736e1)
(cherry picked from commit a73aaaeb579bc7454621c4389636a6d4a952d58c)

Details

Provenance
markjAuthored on Feb 10 2021, 4:10 PM
Reviewer
alc
Differential Revision
D28555: vm: Honour the "noreuse" flag to vm_page_unwire_managed()
Parents
rG6461715f1ae1: update releng/13.0 to BETA2
Branches
Unknown
Tags
Unknown