]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/slub_def.h
slub: No need for per node slab counters if !SLUB_DEBUG
[linux-2.6-omap-h63xx.git] / include / linux / slub_def.h
index 57deecc79d52787800aa98b72d0cefe9e556e495..79d59c937fac4ca62d0ca98c0b3249d1842d78c1 100644 (file)
@@ -45,9 +45,9 @@ struct kmem_cache_cpu {
 struct kmem_cache_node {
        spinlock_t list_lock;   /* Protect partial list and nr_partial */
        unsigned long nr_partial;
-       atomic_long_t nr_slabs;
        struct list_head partial;
 #ifdef CONFIG_SLUB_DEBUG
+       atomic_long_t nr_slabs;
        struct list_head full;
 #endif
 };
@@ -61,7 +61,7 @@ struct kmem_cache {
        int size;               /* The size of an object including meta data */
        int objsize;            /* The size of an object without meta data */
        int offset;             /* Free pointer offset. */
-       int order;
+       int order;              /* Current preferred allocation order */
 
        /*
         * Avoid an extra cache line for UP, SMP and for the node local to
@@ -138,11 +138,11 @@ static __always_inline int kmalloc_index(size_t size)
        if (size <=        512) return 9;
        if (size <=       1024) return 10;
        if (size <=   2 * 1024) return 11;
+       if (size <=   4 * 1024) return 12;
 /*
  * The following is only needed to support architectures with a larger page
  * size than 4k.
  */
-       if (size <=   4 * 1024) return 12;
        if (size <=   8 * 1024) return 13;
        if (size <=  16 * 1024) return 14;
        if (size <=  32 * 1024) return 15;