diff options
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r-- | sys/vm/vm_pageout.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index c2690af..e9c9927 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -216,15 +216,21 @@ static void vm_req_vmdaemon(int req); #endif static void vm_pageout_page_stats(void); +/* + * Initialize a dummy page for marking the caller's place in the specified + * paging queue. In principle, this function only needs to set the flag + * PG_MARKER. Nonetheless, it sets the flag VPO_BUSY and initializes the hold + * count to one as safety precautions. + */ static void vm_pageout_init_marker(vm_page_t marker, u_short queue) { bzero(marker, sizeof(*marker)); - marker->flags = PG_FICTITIOUS | PG_MARKER; + marker->flags = PG_MARKER; marker->oflags = VPO_BUSY; marker->queue = queue; - marker->wire_count = 1; + marker->hold_count = 1; } /* @@ -1634,7 +1640,9 @@ vm_daemon() struct thread *td; struct vmspace *vm; int breakout, swapout_flags, tryagain, attempts; +#ifdef RACCT uint64_t rsize, ravailable; +#endif while (TRUE) { mtx_lock(&vm_daemon_mtx); @@ -1716,6 +1724,7 @@ again: vm_pageout_map_deactivate_pages( &vm->vm_map, limit); } +#ifdef RACCT rsize = IDX_TO_OFF(size); PROC_LOCK(p); racct_set(p, RACCT_RSS, rsize); @@ -1744,6 +1753,7 @@ again: if (rsize > ravailable) tryagain = 1; } +#endif vmspace_free(vm); } sx_sunlock(&allproc_lock); |