aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-06-19 21:36:00 +0000
committerMark Johnston <markj@FreeBSD.org>2019-06-19 21:36:00 +0000
commitee1f168540a5ce9e6689a6b5811058f4b61bb841 (patch)
tree37efe9a332c99629861c09ab9532e765203cb43b
parent6459a61ea756b4f0c38a69b757987a2f6ab0ffef (diff)
downloadsrc-ee1f168540a5ce9e6689a6b5811058f4b61bb841.tar.gz
src-ee1f168540a5ce9e6689a6b5811058f4b61bb841.zip
Group vm_page_activate()'s definition with other related functions.
No functional change intended. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=349218
-rw-r--r--sys/vm/vm_page.c58
1 files 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
@@ -3401,35 +3401,6 @@ vm_page_requeue(vm_page_t m)
}
/*
- * 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:
*
* Prepares the given page to be put on the free list,
@@ -3680,6 +3651,35 @@ vm_page_unwire_noq(vm_page_t m)
}
/*
+ * 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.
*