aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/slub_def.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index a3e9492fed02..cc0faf3a90be 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -86,7 +86,9 @@ struct kmem_cache {
86 int size; /* The size of an object including meta data */ 86 int size; /* The size of an object including meta data */
87 int object_size; /* The size of an object without meta data */ 87 int object_size; /* The size of an object without meta data */
88 int offset; /* Free pointer offset. */ 88 int offset; /* Free pointer offset. */
89#ifdef CONFIG_SLUB_CPU_PARTIAL
89 int cpu_partial; /* Number of per cpu partial objects to keep around */ 90 int cpu_partial; /* Number of per cpu partial objects to keep around */
91#endif
90 struct kmem_cache_order_objects oo; 92 struct kmem_cache_order_objects oo;
91 93
92 /* Allocation and freeing of slabs */ 94 /* Allocation and freeing of slabs */
@@ -131,6 +133,17 @@ struct kmem_cache {
131 struct kmem_cache_node *node[MAX_NUMNODES]; 133 struct kmem_cache_node *node[MAX_NUMNODES];
132}; 134};
133 135
136#ifdef CONFIG_SLUB_CPU_PARTIAL
137#define slub_cpu_partial(s) ((s)->cpu_partial)
138#define slub_set_cpu_partial(s, n) \
139({ \
140 slub_cpu_partial(s) = (n); \
141})
142#else
143#define slub_cpu_partial(s) (0)
144#define slub_set_cpu_partial(s, n)
145#endif // CONFIG_SLUB_CPU_PARTIAL
146
134#ifdef CONFIG_SYSFS 147#ifdef CONFIG_SYSFS
135#define SLAB_SUPPORTS_SYSFS 148#define SLAB_SUPPORTS_SYSFS
136void sysfs_slab_release(struct kmem_cache *); 149void sysfs_slab_release(struct kmem_cache *);