Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/uvm/uvm.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/uvm/uvm.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.49 retrieving revision 1.49.4.5 diff -u -p -r1.49 -r1.49.4.5 --- src/sys/uvm/uvm.h 2007/02/21 23:48:16 1.49 +++ src/sys/uvm/uvm.h 2007/08/21 22:32:25 1.49.4.5 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm.h,v 1.49 2007/02/21 23:48:16 thorpej Exp $ */ +/* $NetBSD: uvm.h,v 1.49.4.5 2007/08/21 22:32:25 yamt Exp $ */ /* * @@ -84,16 +84,13 @@ struct uvm { /* vm_page queues */ struct pgfreelist page_free[VM_NFREELIST]; /* unallocated pages */ 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_idle_zero; /* TRUE if we should try to zero pages in the idle loop */ /* page daemon trigger */ int pagedaemon; /* daemon sleeps on this */ - struct proc *pagedaemon_proc; /* daemon's pid */ - struct simplelock pagedaemon_lock; + struct lwp *pagedaemon_lwp; /* daemon's lid */ /* aiodone daemon */ struct workqueue *aiodone_queue; @@ -102,24 +99,31 @@ struct uvm { struct pglist *page_hash; /* page hash table (vp/off->page) */ int page_nhash; /* number of buckets */ 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! */ TAILQ_HEAD(, buf) aio_done; /* done async i/o reqs */ /* swap-related items */ - struct simplelock swap_data_lock; bool swap_running; kcondvar_t scheduler_cv; - kmutex_t scheduler_mutex; bool scheduler_kicked; + int swapout_enabled; +}; + +/* + * kernel object: to support anonymous pageable kernel memory + */ +extern struct uvm_object *uvm_kernel_object; - /* kernel object: to support anonymous pageable kernel memory */ - struct uvm_object *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_kentry_lock; +extern kmutex_t uvm_swap_data_lock; +extern kmutex_t uvm_scheduler_mutex; #endif /* _KERNEL */ @@ -166,7 +170,7 @@ extern struct evcnt uvm_ra_miss; #define UVM_UNLOCK_AND_WAIT(event, slock, intr, msg, timo) \ do { \ - (void) ltsleep(event, PVM | PNORELOCK | (intr ? PCATCH : 0), \ + (void) mtsleep(event, PVM | PNORELOCK | (intr ? PCATCH : 0), \ msg, timo, slock); \ } while (/*CONSTCOND*/ 0)