[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77ed0b42-60ac-0746-9a5b-23676e9668f2@huaweicloud.com>
Date: Tue, 25 Jun 2024 19:38:34 +0800
From: Li Lingfeng <lilingfeng@...weicloud.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: tj@...nel.org, josef@...icpanda.com, hch@....de, axboe@...nel.dk,
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
Subject: Re: [PATCH] block: cancel all throttled bios when deleting the cgroup
在 2024/6/25 18:34, Michal Koutný 写道:
> Hello.
>
> On Mon, Jun 24, 2024 at 09:09:40PM GMT, Li Lingfeng <lilingfeng@...weicloud.com> 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.
> When pd_offline_fn is called because of disk going away, it makes sense
> to cancel the bios. However, when pd_offline_fn is called due to cgroup
> removal (with possibly surviving originating process), wouldn't bio
> cancelling lead to loss of data?
> Aha, it wouldn't -- the purpose of the function is to "flush" throttled
> bios (in the original patch they'd immediately fail, here they the IO
> operation may succeed).
> Is that correct? (Wouldn't there be a more descriptive name than
> tg_cancel_bios then?)
Thanks for your advice. It's indeed more appropriate to use "flush"
instead of "cancel" here, I will change it soon.
>
> And if a user is allowed to remove cgroup and use this to bypass the
> throttling, they also must have permissions to migrate away from the
> cgroup (and consistent config would thus allow them to change the limit
> too), therefore this doesn't allow bypassing the throttling limit. If
> you agree, could you please add the explanation to commit message too?
I didn't quite get what you mean. Do you mean this patch will cause a
change in mechanics, and it is necessary to add an explanation?
(After deleting the original cgroup,
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.)
> Thanks,
> Michal
Powered by blists - more mailing lists