From: Tejun Heo <tj@kernel.org>
To: hanjinke <hanjinke.666@bytedance.com>
Cc: josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [PATCH] blk-throttle: Fix io statistics for cgroup v1
Date: Thu, 30 Mar 2023 15:44:50 -1000 [thread overview]
Message-ID: <ZCY7EoAUqfB0ac8S@slm.duckdns.org> (raw)
In-Reply-To: <1a858cce-4d87-5e0a-9274-52cffde7dea6@bytedance.com>
Hello,
On Thu, Mar 30, 2023 at 11:44:04AM +0800, hanjinke wrote:
> 在 2023/3/30 上午2:54, Tejun Heo 写道:
> > On Tue, Mar 28, 2023 at 10:23:09PM +0800, Jinke Han wrote:
> > > From: Jinke Han <hanjinke.666@bytedance.com>
> > >
> > > Now the io statistics of cgroup v1 are no longer accurate. Although
> > > in the long run it's best that rstat is a good implementation of
> > > cgroup v1 io statistics. But before that, we'd better fix this issue.
> >
> > Can you please expand on how the stats are wrong on v1 and how the patch
> > fixes it?
> >
> > Thanks.
> >
> Now blkio.throttle.io_serviced and blkio.throttle.io_serviced become the
"now" might be a bit too vague. Can you point to the commit which made the
change?
> only stable io stats interface of cgroup v1, and these statistics are done
> in the blk-throttle code. But the current code only counts the bios that are
Ah, okay, so the stats are now updated by blk-throtl itself but
> actually throttled. When the user does not add the throttle limit, the io
> stats for cgroup v1 has nothing. I fix it according to the statistical
> method of v2, and made it count all ios accurately.
updated only when limits are configured which can be confusing. Makes sense
to me. Can you please update the patch description accordingly?
Also, the following change:
@@ -2033,6 +2033,9 @@ void blk_cgroup_bio_start(struct bio *bio)
struct blkg_iostat_set *bis;
unsigned long flags;
+ if (!cgroup_subsys_on_dfl(io_cgrp_subsys))
+ return;
+
/* Root-level stats are sourced from system-wide IO stats */
if (!cgroup_parent(blkcg->css.cgroup))
return;
seems incomplete as there's an additional
cgroup_subsys_on_dfl(io_cgrp_subsys) test in the function. We probably wanna
remove that?
Thanks.
--
tejun
next prev parent reply other threads:[~2023-03-31 1:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 14:23 Jinke Han
2023-03-29 18:54 ` Tejun Heo
2023-03-30 3:44 ` [External] " hanjinke
2023-03-31 1:44 ` Tejun Heo [this message]
2023-03-31 3:00 ` hanjinke
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=ZCY7EoAUqfB0ac8S@slm.duckdns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=hanjinke.666@bytedance.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.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®