diff options
author | kib <kib@FreeBSD.org> | 2018-02-21 11:29:07 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2018-02-21 11:29:07 +0000 |
commit | c3fcf362533d6ca5223704ec072c3d4b95c6a5f7 (patch) | |
tree | 27c11bc8b4f8eccd5cf20f778fcc83b5ee9245da | |
parent | c3179a4c90eee3a08297f783690e9817d6be5600 (diff) | |
download | FreeBSD-src-c3fcf362533d6ca5223704ec072c3d4b95c6a5f7.zip FreeBSD-src-c3fcf362533d6ca5223704ec072c3d4b95c6a5f7.tar.gz |
MFC r329256:
Cleanup unused page argument for vm_reserv_break().
-rw-r--r-- | sys/vm/vm_reserv.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index 8f07b7d..65b65e2 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -231,7 +231,7 @@ static long vm_reserv_reclaimed; SYSCTL_LONG(_vm_reserv, OID_AUTO, reclaimed, CTLFLAG_RD, &vm_reserv_reclaimed, 0, "Cumulative number of reclaimed reservations"); -static void vm_reserv_break(vm_reserv_t rv, vm_page_t m); +static void vm_reserv_break(vm_reserv_t rv); static void vm_reserv_depopulate(vm_reserv_t rv, int index); static vm_reserv_t vm_reserv_from_page(vm_page_t m); static boolean_t vm_reserv_has_pindex(vm_reserv_t rv, @@ -726,16 +726,15 @@ found: } /* - * Breaks the given reservation. Except for the specified free page, all free - * pages in the reservation are returned to the physical memory allocator. - * The reservation's population count and map are reset to their initial - * state. + * Breaks the given reservation. All free pages in the reservation + * are returned to the physical memory allocator. The reservation's + * population count and map are reset to their initial state. * * The given reservation must not be in the partially populated reservation * queue. The free page queue lock must be held. */ static void -vm_reserv_break(vm_reserv_t rv, vm_page_t m) +vm_reserv_break(vm_reserv_t rv) { int begin_zeroes, hi, i, lo; @@ -747,18 +746,6 @@ vm_reserv_break(vm_reserv_t rv, vm_page_t m) LIST_REMOVE(rv, objq); rv->object = NULL; rv->pages->psind = 0; - if (m != NULL) { - /* - * Since the reservation is being broken, there is no harm in - * abusing the population map to stop "m" from being returned - * to the physical memory allocator. - */ - i = m - rv->pages; - KASSERT(popmap_is_clear(rv->popmap, i), - ("vm_reserv_break: reserv %p's popmap is corrupted", rv)); - popmap_set(rv->popmap, i); - rv->popcnt++; - } i = hi = 0; do { /* Find the next 0 bit. Any previous 0 bits are < "hi". */ @@ -819,7 +806,7 @@ vm_reserv_break_all(vm_object_t object) TAILQ_REMOVE(&vm_rvq_partpop, rv, partpopq); rv->inpartpopq = FALSE; } - vm_reserv_break(rv, NULL); + vm_reserv_break(rv); } mtx_unlock(&vm_page_queue_free_mtx); } @@ -928,7 +915,7 @@ vm_reserv_reclaim(vm_reserv_t rv) ("vm_reserv_reclaim: reserv %p's inpartpopq is FALSE", rv)); TAILQ_REMOVE(&vm_rvq_partpop, rv, partpopq); rv->inpartpopq = FALSE; - vm_reserv_break(rv, NULL); + vm_reserv_break(rv); vm_reserv_reclaimed++; } |