svn commit: r247731 - user/attilio/vmc-playground/sys/vm

Alan Cox alc at FreeBSD.org
Sun Mar 3 20:37:27 UTC 2013


Author: alc
Date: Sun Mar  3 20:37:27 2013
New Revision: 247731
URL: http://svnweb.freebsd.org/changeset/base/247731

Log:
  We don't need to reinitialize the root of the page cache trie on every
  vm object allocation.  We can, instead, rely on the type stability of
  the vm object zone.  (Note that we already assert that the page cache
  trie is empty in the vm object zone destructor.)
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  user/attilio/vmc-playground/sys/vm/vm_object.c

Modified: user/attilio/vmc-playground/sys/vm/vm_object.c
==============================================================================
--- user/attilio/vmc-playground/sys/vm/vm_object.c	Sun Mar  3 20:10:56 2013	(r247730)
+++ user/attilio/vmc-playground/sys/vm/vm_object.c	Sun Mar  3 20:37:27 2013	(r247731)
@@ -203,6 +203,7 @@ vm_object_zinit(void *mem, int size, int
 	object->paging_in_progress = 0;
 	object->resident_page_count = 0;
 	object->shadow_count = 0;
+	object->cache.rt_root = 0;
 	return (0);
 }
 
@@ -249,7 +250,6 @@ _vm_object_allocate(objtype_t type, vm_p
 #if VM_NRESERVLEVEL > 0
 	LIST_INIT(&object->rvq);
 #endif
-	object->cache.rt_root = 0;
 
 	mtx_lock(&vm_object_list_mtx);
 	TAILQ_INSERT_TAIL(&vm_object_list, object, object_list);


More information about the svn-src-user mailing list