From ee1f168540a5ce9e6689a6b5811058f4b61bb841 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 19 Jun 2019 21:36:00 +0000 Subject: Group vm_page_activate()'s definition with other related functions. No functional change intended. MFC after: 3 days --- sys/vm/vm_page.c | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4c124727483a..a90961ce57b5 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -3400,35 +3400,6 @@ vm_page_requeue(vm_page_t m) 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: * @@ -3679,6 +3650,35 @@ vm_page_unwire_noq(vm_page_t m) 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 * the page if it is already in the inactive queue. -- cgit v1.2.3