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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to