Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2018 11:29:08 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329706 - stable/11/sys/vm
Message-ID:  <201802211129.w1LBT8gE004958@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Feb 21 11:29:07 2018
New Revision: 329706
URL: https://svnweb.freebsd.org/changeset/base/329706

Log:
  MFC r329256:
  Cleanup unused page argument for vm_reserv_break().

Modified:
  stable/11/sys/vm/vm_reserv.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_reserv.c
==============================================================================
--- stable/11/sys/vm/vm_reserv.c	Wed Feb 21 11:28:05 2018	(r329705)
+++ stable/11/sys/vm/vm_reserv.c	Wed Feb 21 11:29:07 2018	(r329706)
@@ -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++;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802211129.w1LBT8gE004958>