aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index c0fcf28c15b2..869efb8d2377 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -11,6 +11,8 @@
11 11
12#include <linux/gfp.h> 12#include <linux/gfp.h>
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/workqueue.h>
15
14 16
15/* 17/*
16 * Flags to pass to kmem_cache_create(). 18 * Flags to pass to kmem_cache_create().
@@ -179,7 +181,6 @@ void kmem_cache_free(struct kmem_cache *, void *);
179#ifndef ARCH_SLAB_MINALIGN 181#ifndef ARCH_SLAB_MINALIGN
180#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) 182#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
181#endif 183#endif
182
183/* 184/*
184 * This is the main placeholder for memcg-related information in kmem caches. 185 * This is the main placeholder for memcg-related information in kmem caches.
185 * struct kmem_cache will hold a pointer to it, so the memory cost while 186 * struct kmem_cache will hold a pointer to it, so the memory cost while
@@ -197,6 +198,10 @@ void kmem_cache_free(struct kmem_cache *, void *);
197 * @memcg: pointer to the memcg this cache belongs to 198 * @memcg: pointer to the memcg this cache belongs to
198 * @list: list_head for the list of all caches in this memcg 199 * @list: list_head for the list of all caches in this memcg
199 * @root_cache: pointer to the global, root cache, this cache was derived from 200 * @root_cache: pointer to the global, root cache, this cache was derived from
201 * @dead: set to true after the memcg dies; the cache may still be around.
202 * @nr_pages: number of pages that belongs to this cache.
203 * @destroy: worker to be called whenever we are ready, or believe we may be
204 * ready, to destroy this cache.
200 */ 205 */
201struct memcg_cache_params { 206struct memcg_cache_params {
202 bool is_root_cache; 207 bool is_root_cache;
@@ -206,6 +211,9 @@ struct memcg_cache_params {
206 struct mem_cgroup *memcg; 211 struct mem_cgroup *memcg;
207 struct list_head list; 212 struct list_head list;
208 struct kmem_cache *root_cache; 213 struct kmem_cache *root_cache;
214 bool dead;
215 atomic_t nr_pages;
216 struct work_struct destroy;
209 }; 217 };
210 }; 218 };
211}; 219};