Skip to content

linux/Documentation/scheduler/sched-rt-group.rst

Imported from _research/manual-study-linux/file-notes/linux__Documentation__scheduler__sched-rt-group.rst.md.

File Notes: Documentation/scheduler/sched-rt-group.rst

Status: reviewed.

Purpose

Documents real-time group scheduling: deterministic bandwidth reservation, system-wide RT runtime controls, cgroup runtime controls, defaults, and stability warnings.

Key Points

RT scheduling needs fixed CPU-time portions because fuzzy upper limits do not give deterministic guarantees. Linux controls RT CPU time as runtime within a period. Unallocated or unused RT time remains available to normal tasks.

The system-wide knobs are /proc/sys/kernel/sched_rt_period_us and /proc/sys/kernel/sched_rt_runtime_us. Defaults reserve most but not all CPU time for RT, leaving recovery time for non-RT work. With RT group scheduling, cgroup runtime must be assigned before non-root groups can run RT tasks.

Rust Translation Guidance

Represent RT admission as budget configuration, not only privilege. Enforce runtime <= period and keep recovery capacity available by default.

AI-Native Systems Guidance

High-priority AI agents should have runtime caps. A privileged “real-time” agent that can consume all compute can make the system unrecoverable, so the default policy should reserve capacity for control-plane and recovery tasks.

Evidence

  • The warning about unstable settings is at Documentation/scheduler/sched-rt-group.rst:18-33.
  • Deterministic RT bandwidth and runtime-within-period allocation are described at Documentation/scheduler/sched-rt-group.rst:42-58.
  • The RT period/runtime knobs and allowed value ranges are documented at Documentation/scheduler/sched-rt-group.rst:87-108.
  • Defaults reserve 0.05s per second for non-RT recovery at Documentation/scheduler/sched-rt-group.rst:113-117.
  • Cgroup RT runtime requirements and schedulability sum are at Documentation/scheduler/sched-rt-group.rst:119-150.