Group vm_page_activate()'s definition with other related functions.
No functional change intended. MFC after: 3 days
This commit is contained in:
parent
6459a61ea7
commit
ee1f168540
@ -3400,35 +3400,6 @@ vm_page_requeue(vm_page_t m)
|
|||||||
vm_pqbatch_submit_page(m, atomic_load_8(&m->queue));
|
vm_pqbatch_submit_page(m, atomic_load_8(&m->queue));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* vm_page_activate:
|
|
||||||
*
|
|
||||||
* Put the specified page on the active list (if appropriate).
|
|
||||||
* Ensure that act_count is at least ACT_INIT but do not otherwise
|
|
||||||
* mess with it.
|
|
||||||
*
|
|
||||||
* The page must be locked.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
vm_page_activate(vm_page_t m)
|
|
||||||
{
|
|
||||||
|
|
||||||
vm_page_assert_locked(m);
|
|
||||||
|
|
||||||
if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0)
|
|
||||||
return;
|
|
||||||
if (vm_page_queue(m) == PQ_ACTIVE) {
|
|
||||||
if (m->act_count < ACT_INIT)
|
|
||||||
m->act_count = ACT_INIT;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
vm_page_dequeue(m);
|
|
||||||
if (m->act_count < ACT_INIT)
|
|
||||||
m->act_count = ACT_INIT;
|
|
||||||
vm_page_enqueue(m, PQ_ACTIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* vm_page_free_prep:
|
* vm_page_free_prep:
|
||||||
*
|
*
|
||||||
@ -3679,6 +3650,35 @@ vm_page_unwire_noq(vm_page_t m)
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* vm_page_activate:
|
||||||
|
*
|
||||||
|
* Put the specified page on the active list (if appropriate).
|
||||||
|
* Ensure that act_count is at least ACT_INIT but do not otherwise
|
||||||
|
* mess with it.
|
||||||
|
*
|
||||||
|
* The page must be locked.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vm_page_activate(vm_page_t m)
|
||||||
|
{
|
||||||
|
|
||||||
|
vm_page_assert_locked(m);
|
||||||
|
|
||||||
|
if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0)
|
||||||
|
return;
|
||||||
|
if (vm_page_queue(m) == PQ_ACTIVE) {
|
||||||
|
if (m->act_count < ACT_INIT)
|
||||||
|
m->act_count = ACT_INIT;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
vm_page_dequeue(m);
|
||||||
|
if (m->act_count < ACT_INIT)
|
||||||
|
m->act_count = ACT_INIT;
|
||||||
|
vm_page_enqueue(m, PQ_ACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Move the specified page to the tail of the inactive queue, or requeue
|
* Move the specified page to the tail of the inactive queue, or requeue
|
||||||
* the page if it is already in the inactive queue.
|
* the page if it is already in the inactive queue.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user