]> err.no Git - linux-2.6/blobdiff - include/linux/slub_def.h
SLUB: Place kmem_cache_cpu structures in a NUMA aware way
[linux-2.6] / include / linux / slub_def.h
index 92e10cf6d0e848ef39379fd38f4a3e52503bf3a5..f74716b59ce233fc44a9816d567e32fe1bba495d 100644 (file)
@@ -16,8 +16,7 @@ struct kmem_cache_cpu {
        struct page *page;
        int node;
        unsigned int offset;
-       /* Lots of wasted space */
-} ____cacheline_aligned_in_smp;
+};
 
 struct kmem_cache_node {
        spinlock_t list_lock;   /* Protect partial list and nr_partial */
@@ -62,7 +61,11 @@ struct kmem_cache {
        int defrag_ratio;
        struct kmem_cache_node *node[MAX_NUMNODES];
 #endif
-       struct kmem_cache_cpu cpu_slab[NR_CPUS];
+#ifdef CONFIG_SMP
+       struct kmem_cache_cpu *cpu_slab[NR_CPUS];
+#else
+       struct kmem_cache_cpu cpu_slab;
+#endif
 };
 
 /*