diff options
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 56c9c7eed34e..ab2b98ad76e1 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -595,68 +595,6 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
595 | return __kmalloc_node(size, flags, node); | 595 | return __kmalloc_node(size, flags, node); |
596 | } | 596 | } |
597 | 597 | ||
598 | struct memcg_cache_array { | ||
599 | struct rcu_head rcu; | ||
600 | struct kmem_cache *entries[0]; | ||
601 | }; | ||
602 | |||
603 | /* | ||
604 | * This is the main placeholder for memcg-related information in kmem caches. | ||
605 | * Both the root cache and the child caches will have it. For the root cache, | ||
606 | * this will hold a dynamically allocated array large enough to hold | ||
607 | * information about the currently limited memcgs in the system. To allow the | ||
608 | * array to be accessed without taking any locks, on relocation we free the old | ||
609 | * version only after a grace period. | ||
610 | * | ||
611 | * Root and child caches hold different metadata. | ||
612 | * | ||
613 | * @root_cache: Common to root and child caches. NULL for root, pointer to | ||
614 | * the root cache for children. | ||
615 | * | ||
616 | * The following fields are specific to root caches. | ||
617 | * | ||
618 | * @memcg_caches: kmemcg ID indexed table of child caches. This table is | ||
619 | * used to index child cachces during allocation and cleared | ||
620 | * early during shutdown. | ||
621 | * | ||
622 | * @root_caches_node: List node for slab_root_caches list. | ||
623 | * | ||
624 | * @children: List of all child caches. While the child caches are also | ||
625 | * reachable through @memcg_caches, a child cache remains on | ||
626 | * this list until it is actually destroyed. | ||
627 | * | ||
628 | * The following fields are specific to child caches. | ||
629 | * | ||
630 | * @memcg: Pointer to the memcg this cache belongs to. | ||
631 | * | ||
632 | * @children_node: List node for @root_cache->children list. | ||
633 | * | ||
634 | * @kmem_caches_node: List node for @memcg->kmem_caches list. | ||
635 | */ | ||
636 | struct memcg_cache_params { | ||
637 | struct kmem_cache *root_cache; | ||
638 | union { | ||
639 | struct { | ||
640 | struct memcg_cache_array __rcu *memcg_caches; | ||
641 | struct list_head __root_caches_node; | ||
642 | struct list_head children; | ||
643 | bool dying; | ||
644 | }; | ||
645 | struct { | ||
646 | struct mem_cgroup *memcg; | ||
647 | struct list_head children_node; | ||
648 | struct list_head kmem_caches_node; | ||
649 | struct percpu_ref refcnt; | ||
650 | |||
651 | void (*work_fn)(struct kmem_cache *); | ||
652 | union { | ||
653 | struct rcu_head rcu_head; | ||
654 | struct work_struct work; | ||
655 | }; | ||
656 | }; | ||
657 | }; | ||
658 | }; | ||
659 | |||
660 | int memcg_update_all_caches(int num_memcgs); | 598 | int memcg_update_all_caches(int num_memcgs); |
661 | 599 | ||
662 | /** | 600 | /** |