SCHED_IDLE is a process scheduling policy in Linux kernel based on which CPU resources are allocated to and used by processes. Starting with kernel version 5.10.134-16.al8, Alibaba Cloud Linux 3 supports the SCHED_IDLE feature at the per-control group (cgroup) level and provides the cpu.idle
interface that allows users to specify whether to use the SCHED_IDLE scheduling policy for a CPU cgroup to achieve fine-grained resource management and scheduling.
Usage notes
In cgroup v1, the
cpu.idle
interface is located at/sys/fs/cgroup/cpu/$cg
.In cgroup v2, the
cpu.idle
interface is located at/sys/fs/cgroup/$cg
.
$cg
is a placeholder, which specifies a cgroup name.
Interface | Value | Description |
cpu.idle | 0 | Disables the SCHED_IDLE scheduling policy of the cgroup. |
1 | Enables the SCHED_IDLE scheduling policy of the cgroup. The minimum timeslice weight is specified for the cgroup and the minimum runtime is no longer guaranteed. Take note of the following limits caused by the incompatibility between the cgroup versions and the SCHED_IDLE scheduling policy:
|