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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da861d63-58c6-3ca0-2535-9089993e9e28@huaweicloud.com>
Date: Fri, 28 Jun 2024 11:32:01 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Li Lingfeng <lilingfeng@...weicloud.com>, Tejun Heo <tj@...nel.org>
Cc: josef@...icpanda.com, hch@....de, axboe@...nel.dk, mkoutny@...e.com,
 cgroups@...r.kernel.org, linux-block@...r.kernel.org,
 linux-kernel@...r.kernel.org, yangerkun@...wei.com, yukuai1@...weicloud.com,
 houtao1@...wei.com, yi.zhang@...wei.com, lilingfeng3@...wei.com,
 "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2] block: flush all throttled bios when deleting the
 cgroup

Hi,

在 2024/06/28 10:04, Li Lingfeng 写道:
> 
> 在 2024/6/28 4:43, Tejun Heo 写道:
>> Hello, Li.
>>
>> On Thu, Jun 27, 2024 at 10:26:06PM +0800, Li Lingfeng wrote:
>>> From: Li Lingfeng <lilingfeng3@...wei.com>
>>>
>>> When a process migrates to another cgroup and the original cgroup is 
>>> deleted,
>>> the restrictions of throttled bios cannot be removed. If the 
>>> restrictions
>>> are set too low, it will take a long time to complete these bios.
>>>
>>> Refer to the process of deleting a disk to remove the restrictions and
>>> issue bios when deleting the cgroup.
>>>
>>> This makes difference on the behavior of throttled bios:
>>> Before: the limit of the throttled bios can't be changed and the bios 
>>> will
>>> complete under this limit;
>>> Now: the limit will be canceled and the throttled bios will be flushed
>>> immediately.
>> I'm not necessarily against this but the description doesn't explain why
>> this is better either. Can you please detail why this behavior is better?
> I think it may be more appropriate to remove the limit of bios after the
> cgroup is deleted, rather than let the bios continue to be throttled by a
> non-existent cgroup.

The backgroud is that our test found this, by:

1) setting a low limit in one cgroup;
2) bind a task in the cgroup and issue lots of IO;
3) migrate the task to root cgroup;
4) delete the cgroup;

And oops, unless the disk is deleted, IO will hang for a long time and
there is no way to recover.

The good thing is that after flushing throttled bio while deleting the
cgroup, this "IO hang" can be avoided. However, I'm not sure for this
change, because user may still want the BIO to be throttled. Anyway,
I don't think this will be a problem in reallife.

Thanks,
Kuai

> 
> If the limit is set too low, and the original cgourp has been deleted, we
> now have no way to make the bios complete immediately, but to wait for the
> bios to slowly complete under the limit.
> 
> Thanks.
> 
>>
>> Thanks.
>>
> 
> 
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ