Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2012 04:34:19 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r230297 - stable/9/sys/vm
Message-ID:  <201201180434.q0I4YJ6X022441@svn.freebsd.org>

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



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