MOS Source Code
Loading...
Searching...
No Matches
vmap_stat_t Struct Reference

Memory usage statistics for a specific vmap area. More...

#include <mmstat.h>

Public Attributes

size_t regular
 regular pages with no special flags being set or unset
 
size_t pagecache
 pages that are in the page cache (file-backed only)
 
size_t cow
 pages that are copy-on-write
 

Detailed Description

Memory usage statistics for a specific vmap area.

Different types of memory: The metrics in this struct only describe what is 'mapped' in the vmap area. Unmapped pages are not counted.

On a page fault, the page is mapped in and the following happens:

Private File-backed: Read pagecache++, cow++, Written regular++, if the page is already mapped, pagecache–, cow– (page is not in the page cache) Forked cow += regular, regular = 0 (regular pages now becomes cow pages, pagecache ones stay pagecache (read-only)) Shared File-backed: Read pagecache++, regular++, Written if the page wasn't previously mapped, pagecache++, regular++ (a new pagecache page is now mapped) Private Anonymous: Read cow++, zero page is mapped Written regular++, cow–, Forked cow += regular, regular = 0 (regular pages now becomes cow pages) Shared Anonymous: NOT IMPLEMENTED (yet)

Definition at line 63 of file mmstat.h.

Member Data Documentation

◆ regular

size_t regular

regular pages with no special flags being set or unset

Definition at line 65 of file mmstat.h.

Referenced by cow_clone_vmap_locked(), and mm_map_user_pages().

◆ pagecache

size_t pagecache

pages that are in the page cache (file-backed only)

Definition at line 66 of file mmstat.h.

◆ cow

size_t cow

pages that are copy-on-write

Definition at line 67 of file mmstat.h.

Referenced by cow_clone_vmap_locked().


The documentation for this struct was generated from the following file: