linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Lingfeng <lilingfeng@huaweicloud.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: tj@kernel.org, josef@toxicpanda.com, hch@lst.de, axboe@kernel.dk,
	cgroups@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, yangerkun@huawei.com,
	yukuai1@huaweicloud.com, houtao1@huawei.com, yi.zhang@huawei.com,
	lilingfeng3@huawei.com
Subject: Re: [PATCH] block: cancel all throttled bios when deleting the cgroup
Date: Fri, 28 Jun 2024 10:04:58 +0800	[thread overview]
Message-ID: <e828dba4-2daa-4c40-b238-2f32ffb73ec4@huaweicloud.com> (raw)
In-Reply-To: <lke5obdxztncs2mtbvgylngxspzzzrmlveibye32cqwog7xw5a@bk22ajawnbtn>


在 2024/6/27 22:48, Michal Koutný 写道:
> On Tue, Jun 25, 2024 at 07:38:34PM GMT, Li Lingfeng <lilingfeng@huaweicloud.com> wrote:
>> Thanks for your advice. It's indeed more appropriate to use "flush" instead
>> of "cancel" here, I will change it soon.
> I saw your v2. Didn't you forget to change also the function name?
Yes, sorry for losing it.
>
>> 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.)
> I mean -- can the new mechanics be exploited to bypass throttling by
> sending IO from a process, migrate it between cgroups and rmdir them?
> That should be covered in the commit log.
Yes.
Migrating a process to a new cgroup means we want the next bio will be
throttled by the new limit.
We can flush the throttled bios by deleting the old cgroup, or keep it
to make the previous bios complete slowly under the original limit.


Thanks.

>
> Thanks,
> Michal


      reply	other threads:[~2024-06-28  2:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 13:09 [PATCH] block: cancel all throttled bios when deleting the cgroup Li Lingfeng
2024-06-25 10:34 ` Michal Koutný
2024-06-25 11:38   ` Li Lingfeng
2024-06-27 14:48     ` Michal Koutný
2024-06-28  2:04       ` Li Lingfeng [this message]

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=e828dba4-2daa-4c40-b238-2f32ffb73ec4@huaweicloud.com \
    --to=lilingfeng@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=houtao1@huawei.com \
    --cc=josef@toxicpanda.com \
    --cc=lilingfeng3@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    /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;
as well as URLs for NNTP newsgroup(s).