Author: alc
Date: Sat Aug 23 05:24:31 2014
New Revision: 270387
URL: http://svnweb.freebsd.org/changeset/base/270387

Log:
  Relax one of the conditions for mapping a page on the fast path.
  
  Reviewed by:  kib
  X-MFC with:   r270011
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c      Sat Aug 23 02:24:47 2014        (r270386)
+++ head/sys/vm/vm_fault.c      Sat Aug 23 05:24:31 2014        (r270387)
@@ -306,8 +306,9 @@ RetryFault:;
                    (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0)
                        goto fast_failed;
                m = vm_page_lookup(fs.first_object, fs.first_pindex);
-               if (m == NULL || vm_page_busied(m) ||
-                   m->valid != VM_PAGE_BITS_ALL)
+               /* A busy page can be mapped for read|execute access. */
+               if (m == NULL || ((prot & VM_PROT_WRITE) != 0 &&
+                   vm_page_busied(m)) || m->valid != VM_PAGE_BITS_ALL)
                        goto fast_failed;
                result = pmap_enter(fs.map->pmap, vaddr, m, prot,
                   fault_type | PMAP_ENTER_NOSLEEP | (wired ? PMAP_ENTER_WIRED :
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to