Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2015 03:12:20 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r289357 - user/alc/PQ_LAUNDRY/sys/vm
Message-ID:  <201510150312.t9F3CK6n016742@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



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