Page MenuHomeFreeBSD

vm_page_advise(9): expand from vm_page_dontneed(9)
Needs ReviewPublic

Authored by mhorne on Nov 8 2023, 7:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 4:46 AM
Unknown Object (File)
Sat, Feb 7, 2:23 AM
Unknown Object (File)
Thu, Jan 29, 12:59 PM
Unknown Object (File)
Jan 26 2026, 9:05 PM
Unknown Object (File)
Jan 24 2026, 8:42 PM
Unknown Object (File)
Jan 23 2026, 10:55 PM
Unknown Object (File)
Dec 20 2025, 12:41 PM
Unknown Object (File)
Nov 6 2025, 1:33 AM
Subscribers

Details

Reviewers
markj
kib
alc
dougm
Summary

The function was renamed and expanded some time ago. Describe its
current functionality.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 54336
Build 51226: arc lint + arc unit

Event Timeline

I'm kind of skeptical that this man page is useful at all. vm_page_advise() really exists just to implement the madvise() system call, it's not going to be called externally. And, it's just a piece of that system call. vm_map_madvise(), vm_object_madvise(), pmap_advise() also implement parts of madvise(); why are they not documented as well? IMHO it's somewhat more useful to focus on improving madvise.3, which is user-facing and describes the user-visible effect for each type of advice. With a high-level understanding of what MADV_FREE etc. are supposed to do, it becomes easier to understand why vm_page_advise() does what it does.

To be clear, I don't object to the patch (certainly it's worth removing the stale link), but I think it is much more useful to document the higher-level components of the VM system, and use code comments to explain "interesting" aspects of the implementation.

I'm kind of skeptical that this man page is useful at all. vm_page_advise() really exists just to implement the madvise() system call, it's not going to be called externally. And, it's just a piece of that system call. vm_map_madvise(), vm_object_madvise(), pmap_advise() also implement parts of madvise(); why are they not documented as well? IMHO it's somewhat more useful to focus on improving madvise.3, which is user-facing and describes the user-visible effect for each type of advice. With a high-level understanding of what MADV_FREE etc. are supposed to do, it becomes easier to understand why vm_page_advise() does what it does.

I agree.