]> git.proxmox.com Git - mirror_spl.git/commitdiff
Lower minimum objects/slab threshold
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 3 Nov 2014 21:50:39 +0000 (13:50 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 5 Nov 2014 18:08:21 +0000 (10:08 -0800)
As long as we can fit a minimum of one object/slab there's no reason
to prevent the creation of the cache.  This effectively pushes the
maximum object size up to 32MB.  The splat cache tests were extended
accordingly to verify this functionality.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
include/sys/kmem.h
module/splat/splat-kmem.c

index adbaea93198c9143a9fe16ea83eb5af5601ab08e..5875dfff68867e601957a5ce7ab69463e58435bc 100644 (file)
@@ -395,7 +395,7 @@ extern struct rw_semaphore spl_kmem_cache_sem;
 #define SPL_KMEM_CACHE_DELAY           15      /* Minimum slab release age */
 #define SPL_KMEM_CACHE_REAP            0       /* Default reap everything */
 #define SPL_KMEM_CACHE_OBJ_PER_SLAB    16      /* Target objects per slab */
-#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN        8       /* Minimum objects per slab */
+#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN        1       /* Minimum objects per slab */
 #define SPL_KMEM_CACHE_ALIGN           8       /* Default object alignment */
 
 #define POINTER_IS_VALID(p)            0       /* Unimplemented */
index 76643db18a8ba2c72aa9f67f9d939f70f2075bb4..db787ae9265eaf967c3c8b8ea51de3b3e4e08732 100644 (file)
@@ -799,6 +799,10 @@ splat_kmem_test6(struct file *file, void *arg)
        if (rc)
                return rc;
 
+       rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0, KMC_VMEM);
+       if (rc)
+               return rc;
+
        /* Off slab (default + kmem + vmem) */
        rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, KMC_OFFSLAB);
        if (rc)
@@ -811,6 +815,11 @@ splat_kmem_test6(struct file *file, void *arg)
 
        rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0,
            KMC_VMEM | KMC_OFFSLAB);
+       if (rc)
+               return rc;
+
+       rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0,
+           KMC_VMEM | KMC_OFFSLAB);
 
        return rc;
 }