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)
Thu, Nov 6, 1:33 AM
Unknown Object (File)
Wed, Nov 5, 5:31 AM
Unknown Object (File)
Tue, Oct 28, 3:14 AM
Unknown Object (File)
Oct 22 2025, 2:58 PM
Unknown Object (File)
Oct 22 2025, 2:16 AM
Unknown Object (File)
Oct 21 2025, 2:39 PM
Unknown Object (File)
Sep 24 2025, 6:30 PM
Unknown Object (File)
Aug 14 2025, 10:55 PM
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.