]> granicus.if.org Git - spl/commitdiff
Allow kmem or vmem based slab for slab_lock and slab_overcommit tests.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 23 Jul 2009 20:50:53 +0000 (13:50 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 23 Jul 2009 20:50:53 +0000 (13:50 -0700)
The slab_overcommit test case could hang on a system with fragmented
memory because it was creating a kmem based slab with 256K objects.
To avoid this I've removed the KMC_KMEM flag which allows the slab
to decide if it should be kmem or vmem backed based on the object
side.  The slab_lock test shares this code and will also be effected.
But the point of these two tests is to stress cache locking and
memory overcommit, the type of slab is not critical.  In fact, allowing
the slab to do the default smart thing is preferable.

module/splat/splat-kmem.c

index fdf02a9174e7a617cef0081cd3885b3f85438de5..b021750adfdd8d30c5ef0b205005c395a25d03f9 100644 (file)
@@ -656,7 +656,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name,
                                  splat_kmem_cache_test_constructor,
                                  splat_kmem_cache_test_destructor,
                                  splat_kmem_cache_test_reclaim,
-                                 kcp, NULL, KMC_KMEM);
+                                 kcp, NULL, 0);
        if (!kcp->kcp_cache) {
                splat_vprint(file, name, "Unable to create '%s'\n", cache_name);
                rc = -ENOMEM;