Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2012 04:48:14 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239121 - head/sys/vm
Message-ID:  <201208070448.q774mE2n021712@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Tue Aug  7 04:48:14 2012
New Revision: 239121
URL: http://svn.freebsd.org/changeset/base/239121

Log:
  Never sleep on busy pages in vm_pageout_launder(), always skip them.  Long
  ago, sleeping on busy pages in vm_pageout_launder() made sense.  The call
  to vm_pageout_flush() specified asynchronous I/O and sleeping on busy pages
  blocked vm_pageout_launder() until the flush had completed.  However, in
  CVS revision 1.35 of vm/vm_contig.c, the call to vm_pageout_flush() was
  changed to request synchronous I/O, but the sleep on busy pages was not
  removed.

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Tue Aug  7 00:42:46 2012	(r239120)
+++ head/sys/vm/vm_pageout.c	Tue Aug  7 04:48:14 2012	(r239121)
@@ -586,23 +586,14 @@ vm_pageout_launder(int queue, int tries,
 			continue;
 		}
 		object = m->object;
-		if (!VM_OBJECT_TRYLOCK(object) &&
+		if ((!VM_OBJECT_TRYLOCK(object) &&
 		    (!vm_pageout_fallback_object_lock(m, &next) ||
-		    m->hold_count != 0)) {
+		    m->hold_count != 0)) || (m->oflags & VPO_BUSY) != 0 ||
+		    m->busy != 0) {
 			vm_page_unlock(m);
 			VM_OBJECT_UNLOCK(object);
 			continue;
 		}
-		if ((m->oflags & VPO_BUSY) != 0 || m->busy != 0) {
-			if (tries == 0) {
-				vm_page_unlock(m);
-				VM_OBJECT_UNLOCK(object);
-				continue;
-			}
-			vm_page_sleep(m, "vpctw0");
-			VM_OBJECT_UNLOCK(object);
-			return (FALSE);
-		}
 		vm_page_test_dirty(m);
 		if (m->dirty == 0)
 			pmap_remove_all(m);



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