summaryrefslogtreecommitdiff
path: root/include/linux/slqb_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slqb_def.h')
-rw-r--r--include/linux/slqb_def.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/linux/slqb_def.h b/include/linux/slqb_def.h
index 8ae1a3711333..395b6f0ac6fd 100644
--- a/include/linux/slqb_def.h
+++ b/include/linux/slqb_def.h
@@ -111,7 +111,7 @@ struct kmem_cache_cpu {
struct kmlist rlist;
struct kmem_cache_list *remote_cache_list;
#endif
-} ____cacheline_aligned;
+} ____cacheline_aligned_in_smp;
/*
* Per-node, per-kmem_cache structure. Used for node-specific allocations.
@@ -128,10 +128,19 @@ struct kmem_cache {
unsigned long flags;
int hiwater; /* LIFO list high watermark */
int freebatch; /* LIFO freelist batch flush size */
+#ifdef CONFIG_SMP
+ struct kmem_cache_cpu **cpu_slab; /* dynamic per-cpu structures */
+#else
+ struct kmem_cache_cpu cpu_slab;
+#endif
int objsize; /* Size of object without meta data */
int offset; /* Free pointer offset. */
int objects; /* Number of objects in slab */
+#ifdef CONFIG_NUMA
+ struct kmem_cache_node **node_slab; /* dynamic per-node structures */
+#endif
+
int size; /* Size of object including meta data */
int order; /* Allocation order */
gfp_t allocflags; /* gfp flags to use on allocation */
@@ -148,15 +157,7 @@ struct kmem_cache {
#ifdef CONFIG_SLQB_SYSFS
struct kobject kobj; /* For sysfs */
#endif
-#ifdef CONFIG_NUMA
- struct kmem_cache_node *node[MAX_NUMNODES];
-#endif
-#ifdef CONFIG_SMP
- struct kmem_cache_cpu *cpu_slab[NR_CPUS];
-#else
- struct kmem_cache_cpu cpu_slab;
-#endif
-};
+} ____cacheline_aligned;
/*
* Kmalloc subsystem.