Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_page.h
Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* PGA_REQUEUE is set when the page is scheduled to be enqueued or requeued | * PGA_REQUEUE is set when the page is scheduled to be enqueued or requeued | ||||
* in its page queue. The page lock must be held to set this flag, and the | * in its page queue. The page lock must be held to set this flag, and the | ||||
* queue lock for the page must be held to clear it. | * queue lock for the page must be held to clear it. | ||||
* | * | ||||
* PGA_REQUEUE_HEAD is a special flag for enqueuing pages near the head of | * PGA_REQUEUE_HEAD is a special flag for enqueuing pages near the head of | ||||
* the inactive queue, thus bypassing LRU. The page lock must be held to | * the inactive queue, thus bypassing LRU. The page lock must be held to | ||||
* set this flag, and the queue lock for the page must be held to clear it. | * set this flag, and the queue lock for the page must be held to clear it. | ||||
* | |||||
* PGA_UNSWAPPED is used to defer freeing swap space to the pageout daemon | |||||
* when the context that dirties the page does not have the object write lock | |||||
* held. | |||||
markj: Can you describe what synchronization is needed to set and clear this flag? | |||||
*/ | */ | ||||
#define PGA_WRITEABLE 0x0001 /* page may be mapped writeable */ | #define PGA_WRITEABLE 0x0001 /* page may be mapped writeable */ | ||||
#define PGA_REFERENCED 0x0002 /* page has been referenced */ | #define PGA_REFERENCED 0x0002 /* page has been referenced */ | ||||
#define PGA_EXECUTABLE 0x0004 /* page may be mapped executable */ | #define PGA_EXECUTABLE 0x0004 /* page may be mapped executable */ | ||||
#define PGA_ENQUEUED 0x0008 /* page is enqueued in a page queue */ | #define PGA_ENQUEUED 0x0008 /* page is enqueued in a page queue */ | ||||
#define PGA_DEQUEUE 0x0010 /* page is due to be dequeued */ | #define PGA_DEQUEUE 0x0010 /* page is due to be dequeued */ | ||||
#define PGA_REQUEUE 0x0020 /* page is due to be requeued */ | #define PGA_REQUEUE 0x0020 /* page is due to be requeued */ | ||||
#define PGA_REQUEUE_HEAD 0x0040 /* page requeue should bypass LRU */ | #define PGA_REQUEUE_HEAD 0x0040 /* page requeue should bypass LRU */ | ||||
#define PGA_NOSYNC 0x0080 /* do not collect for syncer */ | #define PGA_NOSYNC 0x0080 /* do not collect for syncer */ | ||||
#define PGA_UNSWAPPED 0x0100 /* page with swap space was dirtied */ | |||||
Not Done Inline ActionsPresumably these should not be the same value. markj: Presumably these should not be the same value. | |||||
#define PGA_QUEUE_STATE_MASK (PGA_ENQUEUED | PGA_DEQUEUE | PGA_REQUEUE | \ | #define PGA_QUEUE_STATE_MASK (PGA_ENQUEUED | PGA_DEQUEUE | PGA_REQUEUE | \ | ||||
PGA_REQUEUE_HEAD) | PGA_REQUEUE_HEAD) | ||||
/* | /* | ||||
* Page flags. If changed at any other time than page allocation or | * Page flags. If changed at any other time than page allocation or | ||||
* freeing, the modification must be protected by the vm_page lock. | * freeing, the modification must be protected by the vm_page lock. | ||||
* | * | ||||
* The PG_PCPU_CACHE flag is set at allocation time if the page was | * The PG_PCPU_CACHE flag is set at allocation time if the page was | ||||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | |||||
bool vm_page_remove(vm_page_t); | bool vm_page_remove(vm_page_t); | ||||
int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); | int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); | ||||
vm_page_t vm_page_replace(vm_page_t mnew, vm_object_t object, | vm_page_t vm_page_replace(vm_page_t mnew, vm_object_t object, | ||||
vm_pindex_t pindex); | vm_pindex_t pindex); | ||||
void vm_page_requeue(vm_page_t m); | void vm_page_requeue(vm_page_t m); | ||||
int vm_page_sbusied(vm_page_t m); | int vm_page_sbusied(vm_page_t m); | ||||
vm_page_t vm_page_scan_contig(u_long npages, vm_page_t m_start, | vm_page_t vm_page_scan_contig(u_long npages, vm_page_t m_start, | ||||
vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options); | vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options); | ||||
void vm_page_set_dirty(vm_page_t m, bool locked); | |||||
void vm_page_set_valid_range(vm_page_t m, int base, int size); | void vm_page_set_valid_range(vm_page_t m, int base, int size); | ||||
int vm_page_sleep_if_busy(vm_page_t m, const char *msg); | int vm_page_sleep_if_busy(vm_page_t m, const char *msg); | ||||
int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg); | int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg); | ||||
vm_offset_t vm_page_startup(vm_offset_t vaddr); | vm_offset_t vm_page_startup(vm_offset_t vaddr); | ||||
void vm_page_sunbusy(vm_page_t m); | void vm_page_sunbusy(vm_page_t m); | ||||
void vm_page_swapqueue(vm_page_t m, uint8_t oldq, uint8_t newq); | void vm_page_swapqueue(vm_page_t m, uint8_t oldq, uint8_t newq); | ||||
bool vm_page_try_remove_all(vm_page_t m); | bool vm_page_try_remove_all(vm_page_t m); | ||||
bool vm_page_try_remove_write(vm_page_t m); | bool vm_page_try_remove_write(vm_page_t m); | ||||
▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines |
Can you describe what synchronization is needed to set and clear this flag?