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

Alan Cox alc at FreeBSD.org
Tue Mar 12 06:14:32 UTC 2013


Author: alc
Date: Tue Mar 12 06:14:31 2013
New Revision: 248185
URL: http://svnweb.freebsd.org/changeset/base/248185

Log:
  When transferring the page from one object to another, don't insert the
  page into its new object until the page's pindex has been updated.
  Otherwise, one code path within vm_radix_insert() may use the wrong
  pindex value.
  
  Sponsored by:	EMC / Isilon Storage Division

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

Modified: user/attilio/vmcontention/sys/vm/vm_page.c
==============================================================================
--- user/attilio/vmcontention/sys/vm/vm_page.c	Tue Mar 12 04:37:04 2013	(r248184)
+++ user/attilio/vmcontention/sys/vm/vm_page.c	Tue Mar 12 06:14:31 2013	(r248185)
@@ -1110,10 +1110,10 @@ vm_page_cache_transfer(vm_object_t orig_
 		if ((m->pindex - offidxstart) >= new_object->size)
 			break;
 		vm_radix_remove(&orig_object->cache, m->pindex);
-		vm_radix_insert(&new_object->cache, m->pindex - offidxstart, m);
 		/* Update the page's object and offset. */
 		m->object = new_object;
 		m->pindex -= offidxstart;
+		vm_radix_insert(&new_object->cache, m->pindex, m);
 	}
 	mtx_unlock(&vm_page_queue_free_mtx);
 }


More information about the svn-src-user mailing list