From: Tejun Heo <tj@kernel.org>
To: Cheng Yu <serein.chengyu@huawei.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com,
changhuaixin@linux.alibaba.com, shanpeic@linux.alibaba.com,
dtcccc@linux.alibaba.com, vishalc@linux.ibm.com,
linux-kernel@vger.kernel.org, zhangqiao22@huawei.com,
judy.chenhui@huawei.com, yusongping@huawei.com,
zhaowenhui8@huawei.com
Subject: Re: [PATCH v2] sched/fair: set burst to 0 when remove the restriction on cfs bandwidth
Date: Mon, 8 Jul 2024 08:08:20 -1000 [thread overview]
Message-ID: <ZowrFHHXNds36Nsb@slm.duckdns.org> (raw)
In-Reply-To: <20240708120053.861037-1-serein.chengyu@huawei.com>
Hello,
On Mon, Jul 08, 2024 at 08:00:53PM +0800, Cheng Yu wrote:
> From: Zhao Wenhui <zhaowenhui8@huawei.com>
>
> In the cpu subsystem of cgroup v1 and v2, we set the restriction on cfs
> bandwidth by setting the quota and burst value. Later, when we remove
> the restriction by setting the quota to the default value, the burst
> value should also be forced to the its default value of zero.
Explaining a bit why burst value should become zero can be helpful - ie.
what happens when quota is not set but burst is limited?
...
> @@ -10840,6 +10840,12 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota,
> burst + quota > max_cfs_runtime))
> return -EINVAL;
>
> + /*
> + * Ensure burst equals to zero when quota is -1.
> + */
> + if (quota == RUNTIME_INF && burst)
> + return -EINVAL;
This happening would be a bug, right? Would it make more sense to use
WARN_ON_ONCE()?
Thanks.
--
tejun
next prev parent reply other threads:[~2024-07-08 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 12:00 Cheng Yu
2024-07-08 18:08 ` Tejun Heo [this message]
2024-07-09 4:04 ` Cheng Yu
2024-08-09 8:54 ` zhaowenhui (A)
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=ZowrFHHXNds36Nsb@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=changhuaixin@linux.alibaba.com \
--cc=dietmar.eggemann@arm.com \
--cc=dtcccc@linux.alibaba.com \
--cc=judy.chenhui@huawei.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=serein.chengyu@huawei.com \
--cc=shanpeic@linux.alibaba.com \
--cc=vincent.guittot@linaro.org \
--cc=vishalc@linux.ibm.com \
--cc=vschneid@redhat.com \
--cc=yusongping@huawei.com \
--cc=zhangqiao22@huawei.com \
--cc=zhaowenhui8@huawei.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
all inboxes | Powered by JetHome®