svn commit: r230297 - stable/9/sys/vm

Konstantin Belousov kib at FreeBSD.org
Wed Jan 18 04:34:19 UTC 2012


Author: kib
Date: Wed Jan 18 04:34:18 2012
New Revision: 230297
URL: http://svn.freebsd.org/changeset/base/230297

Log:
  MFC r229495:
  Do not restart the scan in vm_object_page_clean() on the object
  generation change if requested mode is async.

Modified:
  stable/9/sys/vm/vm_object.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/vm/vm_object.c
==============================================================================
--- stable/9/sys/vm/vm_object.c	Wed Jan 18 04:12:32 2012	(r230296)
+++ stable/9/sys/vm/vm_object.c	Wed Jan 18 04:34:18 2012	(r230297)
@@ -840,8 +840,12 @@ rescan:
 		if (p->valid == 0)
 			continue;
 		if (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) {
-			if (object->generation != curgeneration)
-				goto rescan;
+			if (object->generation != curgeneration) {
+				if ((flags & OBJPC_SYNC) != 0)
+					goto rescan;
+				else
+					clearobjflags = 0;
+			}
 			np = vm_page_find_least(object, pi);
 			continue;
 		}
@@ -850,8 +854,12 @@ rescan:
 
 		n = vm_object_page_collect_flush(object, p, pagerflags,
 		    flags, &clearobjflags);
-		if (object->generation != curgeneration)
-			goto rescan;
+		if (object->generation != curgeneration) {
+			if ((flags & OBJPC_SYNC) != 0)
+				goto rescan;
+			else
+				clearobjflags = 0;
+		}
 
 		/*
 		 * If the VOP_PUTPAGES() did a truncated write, so


More information about the svn-src-stable-9 mailing list