lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Mar 2023 15:44:50 -1000
From:   Tejun Heo <tj@...nel.org>
To:     hanjinke <hanjinke.666@...edance.com>
Cc:     josef@...icpanda.com, axboe@...nel.dk, cgroups@...r.kernel.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [External] Re: [PATCH] blk-throttle: Fix io statistics for
 cgroup v1

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@...edance.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ