From ca0752c5e3e6fad83d286a22d729390bd8004aec Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 22 Oct 2015 09:48:37 +0900 Subject: 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 Acked-by: Jens Axboe Cc: Vivek Goyal --- block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/blk-cgroup.c') diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index ac8370cb2515..4fa54161d423 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -896,6 +896,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 */ -- cgit v1.2.3