diff options
author | alc <alc@FreeBSD.org> | 2011-07-02 23:34:47 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-07-02 23:34:47 +0000 |
commit | dd0c3b188c37cbd1ccd18d9a4a4593d236e10f24 (patch) | |
tree | 8a9b8aea440e620dd102a77eb5aa58bfd13d95b4 /sys/vm | |
parent | 2b71135edcb30543aa004ed5c8cbcd4639e84573 (diff) | |
download | FreeBSD-src-dd0c3b188c37cbd1ccd18d9a4a4593d236e10f24.zip FreeBSD-src-dd0c3b188c37cbd1ccd18d9a4a4593d236e10f24.tar.gz |
Initialize marker pages as held rather than fictitious/wired. Marking the
page as held is more useful as a safety precaution in case someone forgets
to check for PG_MARKER.
Reviewed by: kib
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_pageout.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index c2690af..6dfdc4b 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; } /* |