aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-10-22 09:48:37 +0900
committerAlex Shi <alex.shi@linaro.org>2016-06-08 11:09:29 +0800
commit16c8d1c291a6964055621529c03b3b69e0317959 (patch)
tree2ff9d17b2e7e25cfcfb8134d8c5543ddbef9afe2
parentdcd5106144c53666d87999078b0df1a7a82ebd06 (diff)
blkcg: don't create "io.stat" on the root cgroup
The stat files on the root cgroup shows stats for the whole system and usually don't contain any information which isn't available through the usual system monitoring mechanisms. Some controllers skip collecting these duplicate stats to optimize cases where cgroup isn't used and later try to emulate the result on demand. This leads to complexities and subtle differences in the information shown through different channels. This is entirely unnecessary and cgroup v2 is dropping stat files which are duplicate from all controllers. This patch removes "io.stat" from the root hierarchy. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Jens Axboe <axboe@kernel.dk> Cc: Vivek Goyal <vgoyal@redhat.com> (cherry picked from commit ca0752c5e3e6fad83d286a22d729390bd8004aec) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--block/blk-cgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 55512dd62633..5bcdfc10c23a 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -899,6 +899,7 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
struct cftype blkcg_files[] = {
{
.name = "stat",
+ .flags = CFTYPE_NOT_ON_ROOT,
.seq_show = blkcg_print_stat,
},
{ } /* terminate */