summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2013-03-03 20:37:27 +0000
committeralc <alc@FreeBSD.org>2013-03-03 20:37:27 +0000
commitf661d6e5222fc7729b0001058730c72399fe1475 (patch)
tree543e7b8a7c344007833222b95c49762770c56e18 /sys/vm/vm_object.c
parent317a9584fbba8c2eed6ff9b28c3e0ed91052ff0f (diff)
downloadFreeBSD-src-f661d6e5222fc7729b0001058730c72399fe1475.zip
FreeBSD-src-f661d6e5222fc7729b0001058730c72399fe1475.tar.gz
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
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud