Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_page.h
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
* object that the page belongs to (O), the page lock (P), | * object that the page belongs to (O), the page lock (P), | ||||
* the per-domain lock for the free queues (F), or the page's queue | * the per-domain lock for the free queues (F), or the page's queue | ||||
* lock (Q). The physical address of a page is used to select its page | * lock (Q). The physical address of a page is used to select its page | ||||
* lock from a pool. The queue lock for a page depends on the value of | * lock from a pool. The queue lock for a page depends on the value of | ||||
* its queue field and described in detail below. If a field is | * its queue field and described in detail below. If a field is | ||||
* annotated below with two of these locks, then holding either lock is | * annotated below with two of these locks, then holding either lock is | ||||
* sufficient for read access, but both locks are required for write | * sufficient for read access, but both locks are required for write | ||||
* access. An annotation of (C) indicates that the field is immutable. | * access. An annotation of (C) indicates that the field is immutable. | ||||
* An annotation of (A) indicates that modifications to the field must | |||||
* be atomic. Accesses to such fields may require additional | |||||
* synchronization depending on the context. | |||||
* | * | ||||
* In contrast, the synchronization of accesses to the page's | * In contrast, the synchronization of accesses to the page's | ||||
* dirty field is machine dependent (M). In the | * dirty field is machine dependent (M). In the | ||||
* machine-independent layer, the lock on the object that the | * machine-independent layer, the lock on the object that the | ||||
* page belongs to must be held in order to operate on the field. | * page belongs to must be held in order to operate on the field. | ||||
* However, the pmap layer is permitted to set all bits within | * However, the pmap layer is permitted to set all bits within | ||||
* the field without holding that lock. If the underlying | * the field without holding that lock. If the underlying | ||||
* architecture does not support atomic read-modify-write | * architecture does not support atomic read-modify-write | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | struct { | ||||
u_long v; | u_long v; | ||||
} memguard; | } memguard; | ||||
} plinks; | } plinks; | ||||
TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */ | TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */ | ||||
vm_object_t object; /* which object am I in (O) */ | vm_object_t object; /* which object am I in (O) */ | ||||
vm_pindex_t pindex; /* offset into object (O,P) */ | vm_pindex_t pindex; /* offset into object (O,P) */ | ||||
vm_paddr_t phys_addr; /* physical address of page (C) */ | vm_paddr_t phys_addr; /* physical address of page (C) */ | ||||
struct md_page md; /* machine dependent stuff */ | struct md_page md; /* machine dependent stuff */ | ||||
union { | u_int ref_count; /* page references (A) */ | ||||
u_int wire_count; | |||||
u_int ref_count; /* page references */ | |||||
}; | |||||
volatile u_int busy_lock; /* busy owners lock */ | volatile u_int busy_lock; /* busy owners lock */ | ||||
uint16_t flags; /* page PG_* flags (P) */ | uint16_t flags; /* page PG_* flags (P) */ | ||||
uint8_t order; /* index of the buddy queue (F) */ | uint8_t order; /* index of the buddy queue (F) */ | ||||
uint8_t pool; /* vm_phys freepool index (F) */ | uint8_t pool; /* vm_phys freepool index (F) */ | ||||
uint8_t aflags; /* access is atomic */ | uint8_t aflags; /* access is atomic */ | ||||
uint8_t oflags; /* page VPO_* flags (O) */ | uint8_t oflags; /* page VPO_* flags (O) */ | ||||
uint8_t queue; /* page queue index (Q) */ | uint8_t queue; /* page queue index (Q) */ | ||||
int8_t psind; /* pagesizes[] index (O) */ | int8_t psind; /* pagesizes[] index (O) */ | ||||
▲ Show 20 Lines • Show All 713 Lines • Show Last 20 Lines |