From: "Michal Koutný" <mkoutny@suse.com>
To: Zhe Liu <liuzhe1@kylinos.cn>
Cc: tj@kernel.org, hannes@cmpxchg.org, corbet@lwn.net,
mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, skhan@linuxfoundation.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
kprateek.nayak@amd.com, cgroups@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sched/fair: Reset incompatible burst on quota change
Date: Thu, 20 Aug 2026 13:43:21 +0200 [thread overview]
Message-ID: <aobnZEh1hfIBhswD@localhost.localdomain> (raw)
In-Reply-To: <20260820033218.214259-2-liuzhe1@kylinos.cn>
[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]
On Thu, Aug 20, 2026 at 11:32:17AM +0800, Zhe Liu <liuzhe1@kylinos.cn> wrote:
> A burst configured while a cgroup has unlimited CPU bandwidth can prevent
> a later finite quota from being installed. For example, on cgroup v2:
>
> # echo 100000000 > cpu.max.burst
> # echo "50000 100000" > cpu.max
> sh: write error: Invalid argument
>
> The quota remains unlimited because tg_set_bandwidth() validates the
> existing burst against the new quota. Recovering requires userspace to
> know that it must clear the burst before retrying the quota update. The
> same problem affects cpu.cfs_quota_us on cgroup v1.
>
> When changing the quota, reset the existing burst to zero if it is
> incompatible with a valid finite quota. Preserve it when it remains
> compatible or when the new quota is unlimited. This lets a quota update
> take effect without depending on the order in which userspace writes the
> two files.
>
> Rejecting the quota would retain this ordering dependency. Clamping the
> burst would instead silently choose a different nonzero policy on behalf
> of userspace.
Why not clamp the burst_us to quota_us? That's quite natural to me.
> Resetting it to zero provides the existing no-burst default while
> leaving compatible bursts untouched.
Like Sashiko said, the user configured values should not get lost, the
resulting burst value (0 or quota or whatever makes sense) might be
applied effectively (to allow configuration order independence) but not
overwrite what was configured.
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-08-20 11:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 3:32 [PATCH 0/2] sched/fair: Reset incompatible burst on quota change Zhe Liu
2026-08-20 3:32 ` [PATCH 1/2] " Zhe Liu
2026-08-20 11:43 ` Michal Koutný [this message]
2026-08-20 3:32 ` [PATCH 2/2] Documentation: describe burst reset on quota changes Zhe Liu
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=aobnZEh1hfIBhswD@localhost.localdomain \
--to=mkoutny@suse.com \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.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=liuzhe1@kylinos.cn \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.