From: Benjamin Segall <bsegall@google.com>
To: Zhao Wenhui <zhaowenhui8@huawei.com>
Cc: <mingo@redhat.com>, <peterz@infradead.org>,
<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<mgorman@suse.de>, <bristot@redhat.com>, <vschneid@redhat.com>,
<shanpeic@linux.alibaba.com>, <changhuaixin@linux.alibaba.com>,
<tj@kernel.org>, <dtcccc@linux.alibaba.com>,
<linux-kernel@vger.kernel.org>, <zhaogongyi@huawei.com>
Subject: Re: [PATCH] sched/fair: limit burst to zero when cfs bandwidth is toggled off
Date: Wed, 17 Aug 2022 14:16:26 -0700 [thread overview]
Message-ID: <xm26fshu4llh.fsf@google.com> (raw)
In-Reply-To: <20220809120320.19496-1-zhaowenhui8@huawei.com> (Zhao Wenhui's message of "Tue, 9 Aug 2022 20:03:20 +0800")
Zhao Wenhui <zhaowenhui8@huawei.com> writes:
> When the quota value in CFS bandwidth is set to -1, that imples the
> cfs bandwidth is toggled off. So the burst feature is supposed to
> be disable as well.
>
> Currently, when quota is -1, burst will not be check, so that it can be
> set to almost arbitery value. Examples:
> mkdir /sys/fs/cgroup/cpu/test
> echo -1 > /sys/fs/cgroup/cpu/test/cpu.cfs_quota_us
> echo 10000000000000000 > /sys/fs/cgroup/cpu/test/cpu.cfs_burst_us
>
> Moreover, after the burst modified by this way, quota can't be set
> to any value:
> echo 100000 > cpu.cfs_quota_us
> -bash: echo: write error: Invalid argument
>
> This patch can ensure the burst value being zero and unalterable,
> when quota is set to -1.
>
> Fixes: f4183717b370 ("sched/fair: Introduce the burstable CFS controller")
> Reported-by: Zhao Gongyi <zhaogongyi@huawei.com>
> Signed-off-by: Zhao Wenhui <zhaowenhui8@huawei.com>
Indeed, good catch.
Reviewed-by: Ben Segall <bsegall@google.com>
next prev parent reply other threads:[~2022-08-17 21:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 12:03 [PATCH] sched/fair: limit burst to zero when cfs bandwidth is toggled off Zhao Wenhui
2022-08-16 5:24 ` Tianchen Ding
2022-08-17 21:16 ` Benjamin Segall [this message]
2022-08-30 3:19 ` zhaowenhui (A)
2022-09-30 8:32 ` zhaowenhui (A)
2022-11-23 8:52 ` 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=xm26fshu4llh.fsf@google.com \
--to=bsegall@google.com \
--cc=bristot@redhat.com \
--cc=changhuaixin@linux.alibaba.com \
--cc=dietmar.eggemann@arm.com \
--cc=dtcccc@linux.alibaba.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=shanpeic@linux.alibaba.com \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=zhaogongyi@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