aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memcontrol.h8
-rw-r--r--include/linux/slab.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e119f3ef793..8dc7c746b44 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -420,6 +420,11 @@ static inline void sock_release_memcg(struct sock *sk)
420 420
421#ifdef CONFIG_MEMCG_KMEM 421#ifdef CONFIG_MEMCG_KMEM
422extern struct static_key memcg_kmem_enabled_key; 422extern struct static_key memcg_kmem_enabled_key;
423
424extern int memcg_limited_groups_array_size;
425#define for_each_memcg_cache_index(_idx) \
426 for ((_idx) = 0; i < memcg_limited_groups_array_size; (_idx)++)
427
423static inline bool memcg_kmem_enabled(void) 428static inline bool memcg_kmem_enabled(void)
424{ 429{
425 return static_key_false(&memcg_kmem_enabled_key); 430 return static_key_false(&memcg_kmem_enabled_key);
@@ -557,6 +562,9 @@ memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp)
557 return __memcg_kmem_get_cache(cachep, gfp); 562 return __memcg_kmem_get_cache(cachep, gfp);
558} 563}
559#else 564#else
565#define for_each_memcg_cache_index(_idx) \
566 for (; NULL; )
567
560static inline bool memcg_kmem_enabled(void) 568static inline bool memcg_kmem_enabled(void)
561{ 569{
562 return false; 570 return false;
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 869efb8d237..b9278663f22 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -220,6 +220,10 @@ struct memcg_cache_params {
220 220
221int memcg_update_all_caches(int num_memcgs); 221int memcg_update_all_caches(int num_memcgs);
222 222
223struct seq_file;
224int cache_show(struct kmem_cache *s, struct seq_file *m);
225void print_slabinfo_header(struct seq_file *m);
226
223/* 227/*
224 * Common kmalloc functions provided by all allocators 228 * Common kmalloc functions provided by all allocators
225 */ 229 */