Document that an incompatible burst is reset when a finite quota is written through the cgroup v1 or cgroup v2 CPU bandwidth interface, while compatible bursts and unlimited quota updates preserve the existing value.
Signed-off-by: Zhe Liu <[email protected]> --- Documentation/admin-guide/cgroup-v2.rst | 5 ++++- Documentation/scheduler/sched-bwc.rst | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index aed195a71cbf..9f5e43d96476 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1200,7 +1200,10 @@ will be referred to. All time durations are in microseconds. which indicates that the group may consume up to $MAX in each $PERIOD duration. "max" for $MAX indicates no limit. If only - one number is written, $MAX is updated. + one number is written, $MAX is updated. When a finite $MAX is + written, an existing cpu.max.burst value which is incompatible + with the new limit is reset to zero. Writing "max" leaves the + burst value unchanged. This file affects only processes under the fair-class scheduler. diff --git a/Documentation/scheduler/sched-bwc.rst b/Documentation/scheduler/sched-bwc.rst index e881a945c188..79bd5f254e50 100644 --- a/Documentation/scheduler/sched-bwc.rst +++ b/Documentation/scheduler/sched-bwc.rst @@ -90,14 +90,16 @@ 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 value will enact the specified bandwidth limit. If +the existing cpu.cfs_burst_us value is incompatible with the new quota, it is +reset to zero. 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. +and return the group to an unconstrained state once more. The existing +cpu.cfs_burst_us value remains unchanged. 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 -- 2.25.1

