Skip to content

Commit d61da00

Browse files
committed
doc: document balloons cpuClasses
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
1 parent 8594522 commit d61da00

1 file changed

Lines changed: 68 additions & 23 deletions

File tree

docs/resource-policy/policy/balloons.md

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -851,30 +851,46 @@ memory-type.resource-policy.nri.io/container.CONTAINER_NAME: HBM,DRAM
851851
These options configure CPU behavior and power management.
852852

853853
**`cpuClass`** (string)
854-
- References a CPU class defined in `control.cpu.classes`
855-
(policy-level configuration).
854+
- References a CPU class defined in `cpuClasses` (preferred) or
855+
`control.cpu.classes` (legacy, policy-level configuration).
856856
- Applied when balloon is created, inflated, or deflated.
857857
- Configures frequency scaling and C-states for CPUs in the balloon.
858858

859859
**`idleCPUClass`** (string, policy-level configuration)
860860
- CPU class for idle CPUs (not in any balloon).
861861
- Applied when CPUs are removed from balloons.
862862

863-
**`control.cpu.classes`** (object, policy-level configuration):
863+
**`cpuClasses`** (list, policy-level configuration):
864864

865-
Each CPU class (keyed by name) can define:
865+
User-friendly CPU class definitions. Each class is an object with:
866866

867-
- `minFreq` (integer): Minimum CPU frequency in kHz.
868-
- `maxFreq` (integer): Maximum CPU frequency in kHz.
869-
- `uncoreMinFreq` (integer): Minimum uncore frequency in kHz.
870-
- `uncoreMaxFreq` (integer): Maximum uncore frequency in kHz.
867+
- `name` (string): Class name referenced by `cpuClass` in balloon types.
868+
- `minFreq` (string or number): Minimum CPU frequency. Accepts values
869+
with units: `"3.2GHz"`, `"2900MHz"`, `"2900000kHz"`, or a plain
870+
number in kHz. Also accepts symbolic names: `"min"` (platform
871+
minimum), `"base"` (CPU base frequency), `"turbo"` (maximum turbo
872+
frequency), which are resolved at runtime from sysfs.
873+
- `maxFreq` (string or number): Maximum CPU frequency (same format).
874+
- `uncoreMinFreq` / `uncoreMaxFreq` (string or number): Uncore
875+
frequency limits (same format).
871876
- `disabledCstates` (list): C-state names to disable (e.g., `["C6", "C8"]`).
872877
- Disabling deep C-states reduces latency by preventing deep sleep.
873878
- Disabling intermediate C-states keeps CPU more responsive longer
874879
after use, but allows it to enter deeper power saving states if
875880
not needed.
876881
- List available C-states: `grep
877882
. /sys/devices/system/cpu/cpu0/cpuidle/state*/name`.
883+
- `energyPerformancePreference` (integer): EPP value for CPUs.
884+
- `freqGovernor` (string): CPUFreq governor (e.g., `"performance"`).
885+
- `turboPriority` (integer): Controls exclusive turbo frequency
886+
access. Among CPU classes with active balloons, only the class
887+
with the highest `turboPriority` gets the symbolic frequency
888+
`"turbo"` resolved to the actual turbo frequency. All other
889+
classes get `"turbo"` resolved to the base frequency. When the
890+
highest-priority class no longer has active balloons, the next
891+
highest-priority class regains turbo. If all classes have
892+
`turboPriority` 0 (default), every class gets real turbo -- no
893+
competition occurs.
878894

879895
```yaml
880896
balloonTypes:
@@ -884,6 +900,37 @@ balloonTypes:
884900
cpuClass: normal
885901
idleCPUClass: powersave
886902
903+
cpuClasses:
904+
- name: turbo
905+
minFreq: "turbo"
906+
maxFreq: "turbo"
907+
disabledCstates: [C6, C8, C10]
908+
turboPriority: 10
909+
- name: normal
910+
minFreq: "min"
911+
maxFreq: "turbo"
912+
turboPriority: 1
913+
- name: powersave
914+
minFreq: "min"
915+
maxFreq: "1.2GHz"
916+
```
917+
918+
**`control.cpu.classes`** (object, legacy policy-level configuration):
919+
920+
This is the original low-level CPU class configuration. It continues
921+
to work for backwards compatibility. If a class name is defined in
922+
both `cpuClasses` and `control.cpu.classes`, the `cpuClasses`
923+
definition takes precedence.
924+
925+
Each CPU class (keyed by name) can define:
926+
927+
- `minFreq` (integer): Minimum CPU frequency in kHz.
928+
- `maxFreq` (integer): Maximum CPU frequency in kHz.
929+
- `uncoreMinFreq` (integer): Minimum uncore frequency in kHz.
930+
- `uncoreMaxFreq` (integer): Maximum uncore frequency in kHz.
931+
- `disabledCstates` (list): C-state names to disable (e.g., `["C6", "C8"]`).
932+
933+
```yaml
887934
control:
888935
cpu:
889936
classes:
@@ -1352,21 +1399,19 @@ spec:
13521399
overloadsLevelInBalloon: false # Share L2 between CPUs within balloon
13531400
13541401
# CPU classes for frequency and C-state control
1355-
control:
1356-
cpu:
1357-
classes:
1358-
ultra-low-latency:
1359-
minFreq: 3500000
1360-
maxFreq: 3900000
1361-
uncoreMinFreq: 2400000
1362-
uncoreMaxFreq: 2400000
1363-
disabledCstates: [C6, C7, C8, C10]
1364-
normal:
1365-
minFreq: 800000
1366-
maxFreq: 2500000
1367-
powersave:
1368-
minFreq: 800000
1369-
maxFreq: 800000
1402+
cpuClasses:
1403+
- name: ultra-low-latency
1404+
minFreq: "base"
1405+
maxFreq: "turbo"
1406+
uncoreMinFreq: "2.4GHz"
1407+
uncoreMaxFreq: "2.4GHz"
1408+
disabledCstates: [C6, C7, C8, C10]
1409+
- name: normal
1410+
minFreq: "min"
1411+
maxFreq: "base"
1412+
- name: powersave
1413+
minFreq: "min"
1414+
maxFreq: "min"
13701415
13711416
# Scheduling for high priority
13721417
schedulingClasses:

0 commit comments

Comments
 (0)