From f661d6e5222fc7729b0001058730c72399fe1475 Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 3 Mar 2013 20:37:27 +0000 Subject: 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 --- sys/vm/vm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/vm/vm_object.c') diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index a0bc8ac..fbc92fc 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -203,6 +203,7 @@ vm_object_zinit(void *mem, int size, int flags) 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_pindex_t size, vm_object_t object) #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); -- cgit v1.1