diff options
Diffstat (limited to 'include/linux/slub_def.h')
-rw-r--r-- | include/linux/slub_def.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 92e10cf6d0e..f74716b59ce 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -16,8 +16,7 @@ struct kmem_cache_cpu { | |||
16 | struct page *page; | 16 | struct page *page; |
17 | int node; | 17 | int node; |
18 | unsigned int offset; | 18 | unsigned int offset; |
19 | /* Lots of wasted space */ | 19 | }; |
20 | } ____cacheline_aligned_in_smp; | ||
21 | 20 | ||
22 | struct kmem_cache_node { | 21 | struct kmem_cache_node { |
23 | spinlock_t list_lock; /* Protect partial list and nr_partial */ | 22 | spinlock_t list_lock; /* Protect partial list and nr_partial */ |
@@ -62,7 +61,11 @@ struct kmem_cache { | |||
62 | int defrag_ratio; | 61 | int defrag_ratio; |
63 | struct kmem_cache_node *node[MAX_NUMNODES]; | 62 | struct kmem_cache_node *node[MAX_NUMNODES]; |
64 | #endif | 63 | #endif |
65 | struct kmem_cache_cpu cpu_slab[NR_CPUS]; | 64 | #ifdef CONFIG_SMP |
65 | struct kmem_cache_cpu *cpu_slab[NR_CPUS]; | ||
66 | #else | ||
67 | struct kmem_cache_cpu cpu_slab; | ||
68 | #endif | ||
66 | }; | 69 | }; |
67 | 70 | ||
68 | /* | 71 | /* |