diff options
author | Vladimir Davydov <vdavydov@virtuozzo.com> | 2016-03-17 17:17:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 18:09:34 -0400 |
commit | 12580e4b54ba8a1b22ec977c200be0174ca42348 (patch) | |
tree | 7af0c8f8aada72d7792a6ec4655437126a3cc321 /mm | |
parent | 27ee57c93ff00b8a2d6c6dd6b0b3dddda7b43b77 (diff) |
mm: memcontrol: report kernel stack usage in cgroup2 memory.stat
Show how much memory is allocated to kernel stacks.
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3ad64bf464fd..4b7dda7c2e74 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -5106,6 +5106,8 @@ static int memory_stat_show(struct seq_file *m, void *v) | |||
5106 | (u64)stat[MEM_CGROUP_STAT_RSS] * PAGE_SIZE); | 5106 | (u64)stat[MEM_CGROUP_STAT_RSS] * PAGE_SIZE); |
5107 | seq_printf(m, "file %llu\n", | 5107 | seq_printf(m, "file %llu\n", |
5108 | (u64)stat[MEM_CGROUP_STAT_CACHE] * PAGE_SIZE); | 5108 | (u64)stat[MEM_CGROUP_STAT_CACHE] * PAGE_SIZE); |
5109 | seq_printf(m, "kernel_stack %llu\n", | ||
5110 | (u64)stat[MEMCG_KERNEL_STACK] * PAGE_SIZE); | ||
5109 | seq_printf(m, "slab %llu\n", | 5111 | seq_printf(m, "slab %llu\n", |
5110 | (u64)(stat[MEMCG_SLAB_RECLAIMABLE] + | 5112 | (u64)(stat[MEMCG_SLAB_RECLAIMABLE] + |
5111 | stat[MEMCG_SLAB_UNRECLAIMABLE]) * PAGE_SIZE); | 5113 | stat[MEMCG_SLAB_UNRECLAIMABLE]) * PAGE_SIZE); |