aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slab_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab_def.h')
-rw-r--r--include/linux/slab_def.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 8235dfbb3b05..b869d1662ba3 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -8,6 +8,8 @@
8 */ 8 */
9 9
10struct kmem_cache { 10struct kmem_cache {
11 struct array_cache __percpu *cpu_cache;
12
11/* 1) Cache tunables. Protected by slab_mutex */ 13/* 1) Cache tunables. Protected by slab_mutex */
12 unsigned int batchcount; 14 unsigned int batchcount;
13 unsigned int limit; 15 unsigned int limit;
@@ -71,23 +73,7 @@ struct kmem_cache {
71 struct memcg_cache_params *memcg_params; 73 struct memcg_cache_params *memcg_params;
72#endif 74#endif
73 75
74/* 6) per-cpu/per-node data, touched during every alloc/free */ 76 struct kmem_cache_node *node[MAX_NUMNODES];
75 /*
76 * We put array[] at the end of kmem_cache, because we want to size
77 * this array to nr_cpu_ids slots instead of NR_CPUS
78 * (see kmem_cache_init())
79 * We still use [NR_CPUS] and not [1] or [0] because cache_cache
80 * is statically defined, so we reserve the max number of cpus.
81 *
82 * We also need to guarantee that the list is able to accomodate a
83 * pointer for each node since "nodelists" uses the remainder of
84 * available pointers.
85 */
86 struct kmem_cache_node **node;
87 struct array_cache *array[NR_CPUS + MAX_NUMNODES];
88 /*
89 * Do not add fields after array[]
90 */
91}; 77};
92 78
93#endif /* _LINUX_SLAB_DEF_H */ 79#endif /* _LINUX_SLAB_DEF_H */