diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-08-07 02:36:12 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-08-07 02:36:12 -0400 |
| commit | 5e2aa2ed08e2e280121dc7cf5609c87d464f12ef (patch) | |
| tree | ca7d7b1480285e3b617fecc5b41f0ce150a82c32 /include/linux/slab.h | |
| parent | f62d14a8072b9756db36ba394e2b267470a40240 (diff) | |
| parent | fc8104bc5a3f6f49d79f45f2706f79f77a9fb2ae (diff) | |
Merge branch 'next' into for-linus
Prepare first round of input updates for 3.17.
Diffstat (limited to 'include/linux/slab.h')
| -rw-r--r-- | include/linux/slab.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 307bfbe62387..1d9abb7d22a0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -116,7 +116,9 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | |||
| 116 | unsigned long, | 116 | unsigned long, |
| 117 | void (*)(void *)); | 117 | void (*)(void *)); |
| 118 | #ifdef CONFIG_MEMCG_KMEM | 118 | #ifdef CONFIG_MEMCG_KMEM |
| 119 | void kmem_cache_create_memcg(struct mem_cgroup *, struct kmem_cache *); | 119 | struct kmem_cache *memcg_create_kmem_cache(struct mem_cgroup *, |
| 120 | struct kmem_cache *, | ||
| 121 | const char *); | ||
| 120 | #endif | 122 | #endif |
| 121 | void kmem_cache_destroy(struct kmem_cache *); | 123 | void kmem_cache_destroy(struct kmem_cache *); |
| 122 | int kmem_cache_shrink(struct kmem_cache *); | 124 | int kmem_cache_shrink(struct kmem_cache *); |
| @@ -369,16 +371,7 @@ kmem_cache_alloc_node_trace(struct kmem_cache *s, | |||
| 369 | #include <linux/slub_def.h> | 371 | #include <linux/slub_def.h> |
| 370 | #endif | 372 | #endif |
| 371 | 373 | ||
| 372 | static __always_inline void * | 374 | extern void *kmalloc_order(size_t size, gfp_t flags, unsigned int order); |
| 373 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) | ||
| 374 | { | ||
| 375 | void *ret; | ||
| 376 | |||
| 377 | flags |= (__GFP_COMP | __GFP_KMEMCG); | ||
| 378 | ret = (void *) __get_free_pages(flags, order); | ||
| 379 | kmemleak_alloc(ret, size, 1, flags); | ||
| 380 | return ret; | ||
| 381 | } | ||
| 382 | 375 | ||
| 383 | #ifdef CONFIG_TRACING | 376 | #ifdef CONFIG_TRACING |
| 384 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); | 377 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); |
| @@ -533,10 +526,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 533 | * @memcg: pointer to the memcg this cache belongs to | 526 | * @memcg: pointer to the memcg this cache belongs to |
| 534 | * @list: list_head for the list of all caches in this memcg | 527 | * @list: list_head for the list of all caches in this memcg |
| 535 | * @root_cache: pointer to the global, root cache, this cache was derived from | 528 | * @root_cache: pointer to the global, root cache, this cache was derived from |
| 536 | * @dead: set to true after the memcg dies; the cache may still be around. | ||
| 537 | * @nr_pages: number of pages that belongs to this cache. | 529 | * @nr_pages: number of pages that belongs to this cache. |
| 538 | * @destroy: worker to be called whenever we are ready, or believe we may be | ||
| 539 | * ready, to destroy this cache. | ||
| 540 | */ | 530 | */ |
| 541 | struct memcg_cache_params { | 531 | struct memcg_cache_params { |
| 542 | bool is_root_cache; | 532 | bool is_root_cache; |
| @@ -549,9 +539,7 @@ struct memcg_cache_params { | |||
| 549 | struct mem_cgroup *memcg; | 539 | struct mem_cgroup *memcg; |
| 550 | struct list_head list; | 540 | struct list_head list; |
| 551 | struct kmem_cache *root_cache; | 541 | struct kmem_cache *root_cache; |
| 552 | bool dead; | ||
| 553 | atomic_t nr_pages; | 542 | atomic_t nr_pages; |
| 554 | struct work_struct destroy; | ||
| 555 | }; | 543 | }; |
| 556 | }; | 544 | }; |
| 557 | }; | 545 | }; |
