svn commit: r192863 - user/kmacy/releng_7_2_fcs/sys/vm

Kip Macy kmacy at FreeBSD.org
Tue May 26 22:34:13 UTC 2009


Author: kmacy
Date: Tue May 26 22:34:13 2009
New Revision: 192863
URL: http://svn.freebsd.org/changeset/base/192863

Log:
  - drop the more heavily contended queue mutex first
  - assert that the page lock is not held at the end of the loop
    when maxlaunder > 0
  - drop the page lock before moving to the next page if none of the condition
    are met

Modified:
  user/kmacy/releng_7_2_fcs/sys/vm/vm_pageout.c

Modified: user/kmacy/releng_7_2_fcs/sys/vm/vm_pageout.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/vm/vm_pageout.c	Tue May 26 22:33:10 2009	(r192862)
+++ user/kmacy/releng_7_2_fcs/sys/vm/vm_pageout.c	Tue May 26 22:34:13 2009	(r192863)
@@ -961,8 +961,8 @@ rescan0:
 			 * of time.
 			 */
 			if (object->type == OBJT_VNODE) {
-				vm_page_unlock(m);
 				vm_page_unlock_queues();
+				vm_page_unlock(m);
 				vp = object->handle;
 				if (vp->v_type == VREG &&
 				    vn_start_write(vp, &mp, V_NOWAIT) != 0) {
@@ -1059,8 +1059,10 @@ unlock_and_continue:
 			next = TAILQ_NEXT(&marker, pageq);
 			TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl,
 				     &marker, pageq);
+			vm_page_lock_assert(m, MA_NOTOWNED);
 			continue;
 		}
+		vm_page_unlock(m);
 		VM_OBJECT_UNLOCK(object);
 	}
 


More information about the svn-src-user mailing list