All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/fair: expose cpu.max.runtime for credit injection
@ 2026-05-25 19:36 Fernand Sieber
  2026-05-25 19:36 ` [PATCH 1/2] sched/fair: expose cpu.max.runtime to set bandwidth runtime directly Fernand Sieber
  2026-05-25 19:36 ` [PATCH 2/2] sched/ext: add cgroup_set_runtime ops callback Fernand Sieber
  0 siblings, 2 replies; 8+ messages in thread
From: Fernand Sieber @ 2026-05-25 19:36 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Tejun Heo, David Vernet, Andrea Righi, Changwoo Min,
	Dietmar Eggemann, Ben Segall, Mel Gorman, linux-kernel,
	nh-open-source, Fahad Mubeen, Hendrik Borghorst, David Woodhouse,
	Fernand Sieber

This series adds a cpu.max.runtime cgroup v2 interface that allows
userspace to set the CFS bandwidth controller's runtime directly,
enabling CPU credit injection.

An orchestrator writes a runtime budget which the cgroup consumes
naturally through the existing bandwidth enforcement mechanism. Each
period, the task consumes runtime and the refill restores only quota
(capped at quota + burst), so the injected credits drain until runtime
falls below the cap, after which the cgroup returns to its steady-state
quota allocation.

The series also relaxes the burst validation: burst is no longer
required to be <= quota, only that burst + quota does not overflow.
This allows configuring burst > quota so that the runtime cap can reach
up to one full period, enabling 100% utilization while credits last.

A selftest (test_cpucg_max_runtime) validates the credit injection
mechanism by configuring a cgroup with minimal quota but large burst,
injecting credits via cpu.max.runtime, and verifying that the resulting
CPU usage matches the injected budget.

Patch 1 adds the core interface and selftest.
Patch 2 adds sched_ext integration: an ops callback for BPF scheduler
notification when runtime credits are injected.

Fernand Sieber (2):
  sched/fair: expose cpu.max.runtime to set bandwidth runtime directly
  sched/ext: add cgroup_set_runtime ops callback

 include/linux/sched/ext.h                 |  1 +
 kernel/sched/core.c                       | 46 ++++++++++++++++-
 kernel/sched/ext.c                        | 17 +++++++
 kernel/sched/ext.h                        |  2 +
 kernel/sched/ext_internal.h               | 12 +++++
 tools/testing/selftests/cgroup/test_cpu.c | 62 +++++++++++++++++++++++
 6 files changed, 138 insertions(+), 2 deletions(-)

-- 
2.47.3




Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-28 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25 19:36 [PATCH 0/2] sched/fair: expose cpu.max.runtime for credit injection Fernand Sieber
2026-05-25 19:36 ` [PATCH 1/2] sched/fair: expose cpu.max.runtime to set bandwidth runtime directly Fernand Sieber
2026-05-26 20:52   ` Benjamin Segall
2026-05-28  7:25     ` Fernand Sieber
2026-05-27 19:04   ` Tejun Heo
2026-05-28  6:54     ` Fernand Sieber
2026-05-28 14:37       ` Tejun Heo
2026-05-25 19:36 ` [PATCH 2/2] sched/ext: add cgroup_set_runtime ops callback Fernand Sieber

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.