Skip to contentSkip to conversation

blkcg: don't create "io.stat" on the root cgroup

PATCH In review Tejun Heo 2 participants 3 messages Oct 22, 2015

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author maintainer
#0 lore raw

PATCH 1/1 blkcg: don't create "io.stat" on the root cgroup

Hello, Jens.

This is one of hopefully final adjustments to cgroup v2 behavior before lifting the devel mask. If the patch is okay, can I route the patch through cgroup/for-4.4 so that it can go together with the cgroup documentation update patch?

Thanks.

------ 8< ------
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.

Cc Jens Axboe <[email protected]>
Cc Vivek Goyal <[email protected]>
---
 block/blk-cgroup.c |    1 +
 1 file changed, 1 insertion(+)
block/blk-cgroup.c +1 -0
@@ -896,6 +896,7 @@ static int blkcg_print_stat(struct seq_f
 struct cftype blkcg_files[] = {
 	{
 		.name = "stat",
+		.flags = CFTYPE_NOT_ON_ROOT,
 		.seq_show = blkcg_print_stat,
 	},
 	{ }	/* terminate */
maintainer
#1 lore raw
Quoted 6 lines · Tejun Heo

Hello, Jens.

This is one of hopefully final adjustments to cgroup v2 behavior before lifting the devel mask. If the patch is okay, can I route the patch through cgroup/for-4.4 so that it can go together with the cgroup documentation update patch?

Yep that's fine, you can add my acked-by as well.

Signature · 1 line
Jens Axboe
author maintainer Applied
#2 lore raw
Quoted 9 lines · Jens Axboe
Quoted 6 lines · Tejun Heo

Hello, Jens.

This is one of hopefully final adjustments to cgroup v2 behavior before lifting the devel mask. If the patch is okay, can I route the patch through cgroup/for-4.4 so that it can go together with the cgroup documentation update patch?

Yep that's fine, you can add my acked-by as well.

Applied to cgroup/for-4.4 with acked-by added.

Thanks!

Signature · 1 line
tejun