Skip to contentSkip to conversation

blk-cgroup: don't account iostat for root cgroup

PATCH In review Boris Burkov 2 participants 2 messages Jun 1, 2020 – Jun 2, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blk-cgroup: don't account iostat for root cgroup

This data is never flushed by rstat, so it is never used. We shouldn't bother collecting it. We can access global disk stats to compute io statistics for the root cgroup.

---
 include/linux/blk-cgroup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/blk-cgroup.h +1 -1
index a57ebe2f00ab..e9de4ec07182 100644
@@ -591,7 +591,7 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q,
 
 	throtl = blk_throtl_bio(q, blkg, bio);
 
-	if (!throtl) {
+	if (blkg->parent && !throtl) {
 		struct blkg_iostat_set *bis;
 		int rwd, cpu;
 
Signature · 1 line
2.24.1