From: Zhe Liu <liuzhe1@kylinos.cn>
To: tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
corbet@lwn.net, mingo@redhat.com, peterz@infradead.org,
juri.lelli@redhat.com, vincent.guittot@linaro.org
Cc: skhan@linuxfoundation.org, rdunlap@infradead.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
kprateek.nayak@amd.com, dtcccc@linux.alibaba.com,
changhuaixin@linux.alibaba.com, shanpeic@linux.alibaba.com,
cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Zhe Liu <liuzhe1@kylinos.cn>
Subject: [PATCH v3 3/3] docs: cgroup-v2: document CPU quota and burst ordering
Date: Fri, 11 Sep 2026 17:22:58 +0800 [thread overview]
Message-ID: <20260911092258.660771-4-liuzhe1@kylinos.cn> (raw)
In-Reply-To: <20260911092258.660771-1-liuzhe1@kylinos.cn>
Document that quota and burst can be configured in either order, and that
the configured burst is retained across quota changes while its runtime
contribution is capped by the current quota.
Signed-off-by: Zhe Liu <liuzhe1@kylinos.cn>
---
Documentation/admin-guide/cgroup-v2.rst | 7 ++++++-
Documentation/scheduler/sched-bwc.rst | 22 +++++++++++++---------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 86a2a0099178..e94285d48d0c 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1231,7 +1231,12 @@ will be referred to. All time durations are in microseconds.
A read-write single value file which exists on non-root
cgroups. The default is "0".
- The burst in the range [0, $MAX].
+ The burst in microseconds, with a lower bound of 0 and an upper bound
+ independent of the current quota. The configured value is retained
+ when the quota changes and may be larger than the current quota.
+ During CFS runtime refill, the burst contribution is capped at the
+ current quota. The quota and burst files can therefore be written
+ in either order.
This file affects only processes under the fair-class scheduler and a BPF
scheduler with the ``cgroup_set_bandwidth`` callback depending on what
diff --git a/Documentation/scheduler/sched-bwc.rst b/Documentation/scheduler/sched-bwc.rst
index e881a945c188..19cd08195f6b 100644
--- a/Documentation/scheduler/sched-bwc.rst
+++ b/Documentation/scheduler/sched-bwc.rst
@@ -90,20 +90,22 @@ bandwidth restriction in place, such a group is described as an unconstrained
bandwidth group. This represents the traditional work-conserving behavior for
CFS.
-Writing any (valid) positive value(s) no smaller than cpu.cfs_burst_us will
-enact the specified bandwidth limit. The minimum quota allowed for the quota or
-period is 1ms. There is also an upper bound on the period length of 1s.
-Additional restrictions exist when bandwidth limits are used in a hierarchical
-fashion, these are explained in more detail below.
+Writing any valid positive quota value will enact the specified bandwidth
+limit. The minimum quota allowed for the quota or period is 1ms. There is
+also an upper bound on the period length of 1s. Additional restrictions
+exist when bandwidth limits are used in a hierarchical fashion, these are
+explained in more detail below.
Writing any negative value to cpu.cfs_quota_us will remove the bandwidth limit
and return the group to an unconstrained state once more.
A value of 0 for cpu.cfs_burst_us indicates that the group can not accumulate
any unused bandwidth. It makes the traditional bandwidth control behavior for
-CFS unchanged. Writing any (valid) positive value(s) no larger than
-cpu.cfs_quota_us into cpu.cfs_burst_us will enact the cap on unused bandwidth
-accumulation.
+CFS unchanged. A valid positive value written to cpu.cfs_burst_us is retained
+when the quota changes. If it is larger than the current quota, the burst
+contribution during runtime refill is capped at the current quota.
+
+The quota and burst files can be updated in either order.
Any updates to a group's bandwidth specification will result in it becoming
unthrottled if it is in a constrained state.
@@ -243,4 +245,6 @@ Examples
# echo 50000 > cpu.cfs_period_us /* period = 50ms */
# echo 10000 > cpu.cfs_burst_us /* burst = 10ms */
- Larger buffer setting (no larger than quota) allows greater burst capacity.
+ A larger buffer setting allows greater burst capacity. If the configured
+ burst is larger than the quota, the burst contribution is capped at the
+ quota during runtime refill.
--
2.25.1
prev parent reply other threads:[~2026-09-11 9:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 9:22 [PATCH v3 0/3] sched/fair: remove quota/burst write-order dependency Zhe Liu
2026-09-11 9:22 ` [PATCH v3 1/3] " Zhe Liu
2026-09-11 9:22 ` [PATCH v3 2/3] selftests: cgroup: test CPU quota and burst write order Zhe Liu
2026-09-11 9:22 ` Zhe Liu [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=20260911092258.660771-4-liuzhe1@kylinos.cn \
--to=liuzhe1@kylinos.cn \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=changhuaixin@linux.alibaba.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=dtcccc@linux.alibaba.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shanpeic@linux.alibaba.com \
--cc=skhan@linuxfoundation.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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