Page MenuHomeFreeBSD

vm_page(9): new man page
Needs ReviewPublic

Authored by mhorne on Nov 8 2023, 7:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 8:49 AM
Unknown Object (File)
Dec 23 2023, 1:32 AM
Unknown Object (File)
Dec 15 2023, 8:04 AM
Unknown Object (File)
Dec 2 2023, 10:52 PM
Unknown Object (File)
Nov 13 2023, 3:38 PM
Unknown Object (File)
Nov 11 2023, 2:16 PM
Unknown Object (File)
Nov 9 2023, 2:45 AM
Subscribers

Details

Reviewers
markj
kib
alc
dougm
Summary

The primary intent is to introduce a landing page which can link to
existing vm_page_** sub-pages, or other related content. It also
provides a suitable place to expand on key fields in the structure, or
concepts relating to VM pages in general.

Provide a (brief) high-level description of the vm_page_t structure and
its role within the virtual memory system, and a couple other scattered
details.

Diff Detail

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

Event Timeline

mhorne requested review of this revision.Nov 8 2023, 7:01 PM

vm_page's are fictitious or not, and managed or not.

Non-fictitious pages represent a frame of the normal physical memory, that is usable for normal memory purposes. Fictitious pages are typically used to provide VM code with a way to handle some specific physical addresses that could be usefully mapped, or otherwise handled by VM code, but are not backed by plain RAM. Good example are the device register's mapping.

Managed pages are normally managed by VM, in the sense that they are backed by some object (file, anon, etc) and VM manages it content, by e.g. writing page data out to reuse the page on low memory condition, or reading it to instantiate specific named page on page fault. This means that managed page may be repurposed at any time. For managed pages, VM tracks accessed and dirty status. Managed pages belong to some object (queue). If not wired, they are linked into some page queue, like active/inactive/laundry.

Curiously, there are managed fictitious pages (my sin), typically used for GPU memory management.

Non-fictitious non-managed pages are often used for specific kernel needs, e.g. page tables pages are such, with wired count used in non-standard way.

There is per-page lock called 'busy'. Describing it in full details is quite hard, and probably belongs to vm_page_*busy(9).

share/man/man9/vm_page.9
27

it is actually a representation of the physical memory page, or something resembling it. Not a virtual.

48

s/will/may

Also VM_PAGE_TO_PHYS()/VM_PHYS_TO_PAGE() should be explained.