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]
Message-ID: <8abf8186-c5c3-47c1-7acd-9116f127fd03@huawei.com>
Date:   Tue, 17 May 2022 14:16:01 +0800
From:   "yukuai (C)" <yukuai3@...wei.com>
To:     Tejun Heo <tj@...nel.org>
CC:     Zhang Wensheng <zhangwensheng5@...wei.com>,
        "ming.lei@...hat.com >> Ming Lei" <ming.lei@...hat.com>,
        <axboe@...nel.dk>, <linux-block@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <cgroups@...r.kernel.org>
Subject: Re: [PATCH -next] block: fix io hung of setting throttle limit
 frequently

在 2022/05/17 12:18, Tejun Heo 写道:
> On Tue, May 17, 2022 at 11:12:28AM +0800, yukuai (C) wrote:
>> Ming added a condition in tg_with_in_bps_limit():
>> -       if (bps_limit == U64_MAX) {
>> +       /* no need to throttle if this bio's bytes have been accounted */
>> +       if (bps_limit == U64_MAX || bio_flagged(bio, BIO_THROTTLED)) {
>>
>> Which will let the first throttled bio to be issued immediately once
>> the config if updated.
>>
>> Do you think this behaviour is OK? If so, we can do the same for
>> tg_with_in_iops_limit.
> 
> So, the current behavior is that if the user is being silly, it will get
> slower and slower. The new behavior would be that if the user is being
> silly, it can issue IOs faster and faster, which creates a perverse
> incentive to be silly.
Yes,

I just found that Ming's patch introduce a new problem:

If multiple bios are throttled, then they will be issued one by one with
corresponding time. However, after Ming's patch, all throttled bios will
be issued immediately once the waiting time of first bio is reached. And
such behaviour is definitely a problem...

> 
> Probably the right thing to do is probably something like translating the
> existing budget in light of the new configuration so that config change
> neither gives or takes away the budget which has already accumulated. That
> said, are you guys seeing this becoming an issue in practice?

Agreed, the solution sounds reasonable. And this problem is found during
test, which issue a large io and in the meantime updating config with
random value.

Thanks,
Kuai
> 
> Thanks.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ