diff options
author | alc <alc@FreeBSD.org> | 2013-03-03 20:37:27 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-03-03 20:37:27 +0000 |
commit | f661d6e5222fc7729b0001058730c72399fe1475 (patch) | |
tree | 543e7b8a7c344007833222b95c49762770c56e18 /sys/vm | |
parent | 317a9584fbba8c2eed6ff9b28c3e0ed91052ff0f (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/vm/vm_object.c | 2 |
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); |