From: Boris Burkov <boris@bur.io>
To: Tejun Heo <tj@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com,
Boris Burkov <boris@bur.io>
Subject: [PATCH] blk-cgroup: don't account iostat for root cgroup
Date: Mon, 1 Jun 2020 16:11:41 -0700 [thread overview]
Message-ID: <20200601231141.2218370-1-boris@bur.io> (raw)
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.
Signed-off-by: Boris Burkov <boris@bur.io>
---
include/linux/blk-cgroup.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index a57ebe2f00ab..e9de4ec07182 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -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;
--
2.24.1
next reply other threads:[~2020-06-01 23:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 23:11 Boris Burkov [this message]
2020-06-02 2:51 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200601231141.2218370-1-boris@bur.io \
--to=boris@bur.io \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®