svn commit: r235362 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sat May 12 20:24:47 UTC 2012


Author: kib
Date: Sat May 12 20:24:46 2012
New Revision: 235362
URL: http://svn.freebsd.org/changeset/base/235362

Log:
  Assert that fictitious or unmanaged pages do not appear on
  active/inactive lists.
  
  Sponsored by:	The FreeBSD Foundation
  Reviewed by:	alc
  MFC after:	1 month

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Sat May 12 20:23:30 2012	(r235361)
+++ head/sys/vm/vm_pageout.c	Sat May 12 20:24:46 2012	(r235362)
@@ -805,6 +805,11 @@ rescan0:
 		if (m->flags & PG_MARKER)
 			continue;
 
+		KASSERT((m->flags & PG_FICTITIOUS) == 0,
+		    ("Fictitious page %p cannot be in inactive queue", m));
+		KASSERT((m->oflags & VPO_UNMANAGED) == 0,
+		    ("Unmanaged page %p cannot be in inactive queue", m));
+
 		/*
 		 * Lock the page.
 		 */
@@ -1143,6 +1148,10 @@ unlock_and_continue:
 			m = next;
 			continue;
 		}
+		KASSERT((m->flags & PG_FICTITIOUS) == 0,
+		    ("Fictitious page %p cannot be in active queue", m));
+		KASSERT((m->oflags & VPO_UNMANAGED) == 0,
+		    ("Unmanaged page %p cannot be in active queue", m));
 		if (!vm_pageout_page_lock(m, &next)) {
 			vm_page_unlock(m);
 			m = next;


More information about the svn-src-all mailing list