svn commit: r248443 - user/attilio/vmcontention/sys/vm

Alan Cox alc at FreeBSD.org
Sun Mar 17 20:40:31 UTC 2013


Author: alc
Date: Sun Mar 17 20:40:31 2013
New Revision: 248443
URL: http://svnweb.freebsd.org/changeset/base/248443

Log:
  The calls to vm_radix_lookup_ge() by vm_reserv_alloc_{contig,page}() can
  be eliminated.  If the calls to vm_radix_lookup_le() return NULL, then
  the page at the head of the object's memq must be the page with the least
  pindex greater than the specified pindex.
  
  Reviewed by:	attilio
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  user/attilio/vmcontention/sys/vm/vm_reserv.c

Modified: user/attilio/vmcontention/sys/vm/vm_reserv.c
==============================================================================
--- user/attilio/vmcontention/sys/vm/vm_reserv.c	Sun Mar 17 20:11:08 2013	(r248442)
+++ user/attilio/vmcontention/sys/vm/vm_reserv.c	Sun Mar 17 20:40:31 2013	(r248443)
@@ -352,7 +352,7 @@ vm_reserv_alloc_contig(vm_object_t objec
 			goto found;
 		msucc = TAILQ_NEXT(mpred, listq);
 	} else
-		msucc = vm_radix_lookup_ge(&object->rtree, pindex);
+		msucc = TAILQ_FIRST(&object->memq);
 	if (msucc != NULL) {
 		KASSERT(msucc->pindex > pindex,
 		    ("vm_reserv_alloc_page: pindex already allocated"));
@@ -507,7 +507,7 @@ vm_reserv_alloc_page(vm_object_t object,
 			goto found;
 		msucc = TAILQ_NEXT(mpred, listq);
 	} else
-		msucc = vm_radix_lookup_ge(&object->rtree, pindex);
+		msucc = TAILQ_FIRST(&object->memq);
 	if (msucc != NULL) {
 		KASSERT(msucc->pindex > pindex,
 		    ("vm_reserv_alloc_page: pindex already allocated"));


More information about the svn-src-user mailing list