svn commit: r202978 - stable/7/sys/vm

John Baldwin jhb at FreeBSD.org
Mon Jan 25 17:51:34 UTC 2010


Author: jhb
Date: Mon Jan 25 17:51:34 2010
New Revision: 202978
URL: http://svn.freebsd.org/changeset/base/202978

Log:
  MFC 193842:
  Eliminate an unnecessary restriction on the vm object type from
  vm_map_pmap_enter().  The immediate effect of this change is that automatic
  prefaulting by mmap() for small mappings is performed on POSIX shared memory
  objects just the same as it is on ordinary files.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/vm/vm_map.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/vm/vm_map.c
==============================================================================
--- stable/7/sys/vm/vm_map.c	Mon Jan 25 17:00:21 2010	(r202977)
+++ stable/7/sys/vm/vm_map.c	Mon Jan 25 17:51:34 2010	(r202978)
@@ -1485,11 +1485,9 @@ vm_map_pmap_enter(vm_map_t map, vm_offse
 
 	psize = atop(size);
 
-	if (object->type != OBJT_VNODE ||
-	    ((flags & MAP_PREFAULT_PARTIAL) && (psize > MAX_INIT_PT) &&
-	     (object->resident_page_count > MAX_INIT_PT))) {
+	if ((flags & MAP_PREFAULT_PARTIAL) && psize > MAX_INIT_PT &&
+	    object->resident_page_count > MAX_INIT_PT)
 		goto unlock_return;
-	}
 
 	if (psize + pindex > object->size) {
 		if (object->size < pindex)


More information about the svn-src-stable mailing list