version 1.49, 2007/02/21 23:48:16 |
version 1.49.4.3, 2007/04/28 20:47:03 |
|
|
/* vm_page queues */ |
/* vm_page queues */ |
struct pgfreelist page_free[VM_NFREELIST]; /* unallocated pages */ |
struct pgfreelist page_free[VM_NFREELIST]; /* unallocated pages */ |
int page_free_nextcolor; /* next color to allocate from */ |
int page_free_nextcolor; /* next color to allocate from */ |
struct simplelock pageqlock; /* lock for active/inactive page q */ |
|
struct simplelock fpageqlock; /* lock for free page q */ |
|
bool page_init_done; /* TRUE if uvm_page_init() finished */ |
bool page_init_done; /* TRUE if uvm_page_init() finished */ |
bool page_idle_zero; /* TRUE if we should try to zero |
bool page_idle_zero; /* TRUE if we should try to zero |
pages in the idle loop */ |
pages in the idle loop */ |
|
|
/* page daemon trigger */ |
/* page daemon trigger */ |
int pagedaemon; /* daemon sleeps on this */ |
int pagedaemon; /* daemon sleeps on this */ |
struct proc *pagedaemon_proc; /* daemon's pid */ |
struct lwp *pagedaemon_lwp; /* daemon's lid */ |
struct simplelock pagedaemon_lock; |
|
|
|
/* aiodone daemon */ |
/* aiodone daemon */ |
struct workqueue *aiodone_queue; |
struct workqueue *aiodone_queue; |
|
|
struct pglist *page_hash; /* page hash table (vp/off->page) */ |
struct pglist *page_hash; /* page hash table (vp/off->page) */ |
int page_nhash; /* number of buckets */ |
int page_nhash; /* number of buckets */ |
int page_hashmask; /* hash mask */ |
int page_hashmask; /* hash mask */ |
struct simplelock hashlock; /* lock on page_hash array */ |
|
|
|
struct simplelock kentry_lock; |
|
|
|
/* aio_done is locked by uvm.pagedaemon_lock and splbio! */ |
/* aio_done is locked by uvm.pagedaemon_lock and splbio! */ |
TAILQ_HEAD(, buf) aio_done; /* done async i/o reqs */ |
TAILQ_HEAD(, buf) aio_done; /* done async i/o reqs */ |
|
|
/* swap-related items */ |
/* swap-related items */ |
struct simplelock swap_data_lock; |
|
bool swap_running; |
bool swap_running; |
kcondvar_t scheduler_cv; |
kcondvar_t scheduler_cv; |
kmutex_t scheduler_mutex; |
|
bool scheduler_kicked; |
bool scheduler_kicked; |
|
|
/* kernel object: to support anonymous pageable kernel memory */ |
|
struct uvm_object *kernel_object; |
|
|
|
}; |
}; |
|
|
|
/* |
|
* kernel object: to support anonymous pageable kernel memory |
|
*/ |
|
extern struct uvm_object *uvm_kernel_object; |
|
|
|
/* |
|
* locks (made globals for lockstat). |
|
*/ |
|
|
|
extern kmutex_t uvm_pageqlock; /* lock for active/inactive page q */ |
|
extern kmutex_t uvm_fpageqlock; /* lock for free page q */ |
|
extern kmutex_t uvm_pagedaemon_lock; |
|
extern kmutex_t uvm_kentry_lock; |
|
extern kmutex_t uvm_swap_data_lock; |
|
extern kmutex_t uvm_scheduler_mutex; |
|
|
#endif /* _KERNEL */ |
#endif /* _KERNEL */ |
|
|
/* |
/* |
Line 166 extern struct evcnt uvm_ra_miss; |
|
Line 171 extern struct evcnt uvm_ra_miss; |
|
|
|
#define UVM_UNLOCK_AND_WAIT(event, slock, intr, msg, timo) \ |
#define UVM_UNLOCK_AND_WAIT(event, slock, intr, msg, timo) \ |
do { \ |
do { \ |
(void) ltsleep(event, PVM | PNORELOCK | (intr ? PCATCH : 0), \ |
(void) mtsleep(event, PVM | PNORELOCK | (intr ? PCATCH : 0), \ |
msg, timo, slock); \ |
msg, timo, slock); \ |
} while (/*CONSTCOND*/ 0) |
} while (/*CONSTCOND*/ 0) |
|
|