]> granicus.if.org Git - zfs/commitdiff
Make vn_cache|vn_file_cache kmem caches
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 11 Jan 2011 19:57:02 +0000 (11:57 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 12 Jan 2011 19:38:05 +0000 (11:38 -0800)
Both of these caches were previously allowed to be either a
vmem or kmem cache based on the size of the object involved.
Since we know the object won't be to large and performce is
much better for a kmem cache for them to be kmem backed.

module/spl/spl-vnode.c

index a7c7a71389f2c9b7035163bef873301a5b05b254..7630ffd338950500b676a0353a5f164795c13c68 100644 (file)
@@ -795,13 +795,13 @@ vn_init(void)
                                     sizeof(struct vnode), 64,
                                     vn_cache_constructor,
                                     vn_cache_destructor,
-                                    NULL, NULL, NULL, 0);
+                                    NULL, NULL, NULL, KMC_KMEM);
 
        vn_file_cache = kmem_cache_create("spl_vn_file_cache",
                                          sizeof(file_t), 64,
                                          vn_file_cache_constructor,
                                          vn_file_cache_destructor,
-                                         NULL, NULL, NULL, 0);
+                                         NULL, NULL, NULL, KMC_KMEM);
        SRETURN(0);
 } /* vn_init() */