Linux Documentation
 help / color / mirror / Atom feed
From: Zhe Liu <liuzhe1@kylinos.cn>
To: mkoutny@suse.com
Cc: bsegall@google.com, cgroups@vger.kernel.org, corbet@lwn.net,
	dietmar.eggemann@arm.com, hannes@cmpxchg.org,
	juri.lelli@redhat.com, kprateek.nayak@amd.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, liuzhe1@kylinos.cn,
	mgorman@suse.de, mingo@redhat.com, peterz@infradead.org,
	rostedt@goodmis.org, skhan@linuxfoundation.org, tj@kernel.org,
	vincent.guittot@linaro.org, vschneid@redhat.com
Subject: [PATCH v2 0/3] sched/fair: remove quota/burst write-order dependency
Date: Fri,  4 Sep 2026 14:20:10 +0800	[thread overview]
Message-ID: <20260904062013.504236-1-liuzhe1@kylinos.cn> (raw)
In-Reply-To: <aobnZEh1hfIBhswD@localhost.localdomain>

The CPU bandwidth quota and burst controls currently make the order of
userspace writes significant. A burst configured while quota is unlimited can
prevent a later finite quota from being installed, and increasing quota and
burst in the burst-first order can fail with EINVAL.

This series keeps the configured burst value independent of the current quota
and applies the quota-relative clamp when CFS refills runtime. It also adds a
selftest for both write orders and documents the resulting behavior for cgroup
v1 and cgroup v2.

Changes in v2:
  - apply the clamp at refill time instead of changing the configured burst;
  - retain the value reported by cpu.max.burst and cpu.cfs_burst_us;
  - add write-order selftests and update the CPU bandwidth documentation.

Testing:
  make -C tools/testing/selftests TARGETS=cgroup

Zhe Liu (3):
  sched/fair: Remove the write-order dependency between cpu.max and
    cpu.max.burst
  selftests: cgroup: Test CPU quota and burst write order
  Documentation: describe CPU quota and burst ordering

 Documentation/admin-guide/cgroup-v2.rst   |  5 ++-
 Documentation/scheduler/sched-bwc.rst     | 21 ++++++-----
 kernel/sched/core.c                       |  3 +-
 kernel/sched/fair.c                       |  3 +-
 tools/testing/selftests/cgroup/test_cpu.c | 40 +++++++++++++++++++++++
 5 files changed, 59 insertions(+), 13 deletions(-)

-- 
2.25.1

  parent reply	other threads:[~2026-09-04  6:20 UTC|newest]

Thread overview: 10+ 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ý
2026-08-26  3:00     ` Zhe Liu
2026-09-04  6:20     ` Zhe Liu [this message]
2026-09-04  6:20       ` [PATCH v2 1/3] sched/fair: Remove the write-order dependency between cpu.max and cpu.max.burst Zhe Liu
2026-09-04  9:21         ` Tao Cui
2026-09-04  6:20       ` [PATCH v2 2/3] selftests: cgroup: Test CPU quota and burst write order Zhe Liu
2026-09-04  6:20       ` [PATCH v2 3/3] Documentation: describe CPU quota and burst ordering Zhe Liu
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=20260904062013.504236-1-liuzhe1@kylinos.cn \
    --to=liuzhe1@kylinos.cn \
    --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=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox