mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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.
Reported by: bdrewery
Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D28555
(cherry picked from commit 5c18744ea9)
This commit is contained in:
parent
5bc11b95b8
commit
a73aaaeb57
1 changed files with 1 additions and 1 deletions
|
|
@ -3989,7 +3989,7 @@ vm_page_unwire_managed(vm_page_t m, uint8_t nqueue, bool noreuse)
|
|||
* (i.e., the VPRC_OBJREF bit is clear), we only need to
|
||||
* clear leftover queue state.
|
||||
*/
|
||||
vm_page_release_toq(m, nqueue, false);
|
||||
vm_page_release_toq(m, nqueue, noreuse);
|
||||
} else if (old == 1) {
|
||||
vm_page_aflag_clear(m, PGA_DEQUEUE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue