sys/vm/vm_page.c
/*
 * Attempt to move a busied page to PQ_CACHE, then unconditionally unbusy it.
 *
 * This function returns non-zero if it successfully moved the page to
 * PQ_CACHE.
 *
 * This function unconditionally unbusies the page on return.
 */
Attempt to move a busied page to PQ_CACHE, then unconditionally unbusy it.
This function returns non-zero if it successfully moved the page to
PQ_CACHE.

This function unconditionally unbusies the page on return.
Attempt to move a busied page to PQ_CACHE then unconditionally unbusy it . This function returns non - zero if it successfully moved the page to PQ_CACHE . This function unconditionally unbusies the page on return .
int
vm_page_try_to_cache(vm_page_t m)
{
	if (m->dirty || m->hold_count || m->wire_count ||
	    m->queue - m->pc == PQ_CACHE ||
	    (m->flags & (PG_UNQUEUED | PG_NEED_COMMIT | PG_FICTITIOUS))) {
		vm_page_wakeup(m);
		return(0);
	}
	vm_page_test_dirty(m);
	if (m->dirty || (m->flags & PG_NEED_COMMIT)) {
		vm_page_wakeup(m);
		return(0);
	}
	vm_page_cache(m);
	return(1);
}
int vm_page_try_to_cache ( vm_page_t m ) { if ( m -> dirty || m -> hold_count || m -> wire_count || m -> queue - m -> pc == PQ_CACHE || ( m -> flags & ( PG_UNQUEUED | PG_NEED_COMMIT | PG_FICTITIOUS ) ) ) { vm_page_wakeup ( m ) ; return ( 0 ) ; } vm_page_test_dirty ( m ) ; if ( m -> dirty || ( m -> flags & PG_NEED_COMMIT ) ) { vm_page_wakeup ( m ) ; return ( 0 ) ; } vm_page_cache ( m ) ; return ( 1 ) ; }
Attempt to move a busied page to PQ_CACHE, then unconditionally unbusy it.
Attempt to move a busied page to PQ_CACHE then unconditionally unbusy it .
/*
	 * Shortcut if we obviously cannot move the page, or if the
	 * page is already on the cache queue, or it is ficitious.
	 *
	 * Never allow a wired page into the cache.
	 */ /*
	 * Page busied by us and no longer spinlocked.  Dirty pages cannot
	 * be moved to the cache.
	 */