svn commit: r289357 - user/alc/PQ_LAUNDRY/sys/vm

Alan Cox alc at FreeBSD.org
Thu Oct 15 03:12:21 UTC 2015


Author: alc
Date: Thu Oct 15 03:12:19 2015
New Revision: 289357
URL: https://svnweb.freebsd.org/changeset/base/289357

Log:
  Like the inactive queue, we shouldn't find invalid pages in the laundry
  queue.

Modified:
  user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c

Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Thu Oct 15 02:55:01 2015	(r289356)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Thu Oct 15 03:12:19 2015	(r289357)
@@ -1080,11 +1080,12 @@ vm_pageout_launder1(struct vm_domain *vm
 		queues_locked = FALSE;
 
 		/*
-		 * Invalid pages can be easily freed.  They cannot be
-		 * mapped; vm_page_free() asserts this.
+		 * Invalid pages cannot appear on a queue.  If
+		 * vm_pageout_fallback_object_lock() allowed a window
+		 * where the page could be invalidated, it should
+		 * detect this.
 		 */
-		if (m->valid == 0)
-			goto free_page;
+		KASSERT(m->valid != 0, ("invalid page %p in laundry queue", m));
 
 		/*
 		 * If the page has been referenced and the object is not dead,
@@ -1143,7 +1144,6 @@ vm_pageout_launder1(struct vm_domain *vm
 		 * destroyed the object.
 		 */
 		if (m->dirty == 0) {
-free_page:
 			vm_page_free(m);
 			PCPU_INC(cnt.v_dfree);
 		} else if ((object->flags & OBJ_DEAD) == 0) {


More information about the svn-src-user mailing list