Skip to content

Commit

Permalink
docs: update documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
  • Loading branch information
klihub committed Mar 26, 2024
1 parent 9ea7da6 commit 5d6ebd0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docs/resource-policy/developers-guide/cpu-allocator.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The CPU allocator also does automatic CPU prioritization by detecting CPU
features and their configuration parameters. Currently, NRI Resource Policy
supports CPU priority detection based on the `intel_pstate` scaling
driver in the Linux CPUFreq subsystem, and, Intel Speed Select Technology
(SST).
(SST), or based on the detected core types on hybrid CPU architecture
systems.

CPUs are divided into three priority classes, i.e. *high*, *normal* and *low*.
Policies utilizing the CPU allocator may choose to prefer certain priority
Expand Down Expand Up @@ -59,3 +60,10 @@ correspondingly.

CPU cores with high EPP priority (relative to the other cores in the system)
will be marked as high priority cores.

### Hybrid CPU Architecture

On systems with a hybrid CPU architecture, where some cores are optimized for
performance and others for power consumption, performance optimized cores are
classified as high priority CPUs while energy efficient cores as low priority
CPUs.
11 changes: 10 additions & 1 deletion docs/resource-policy/policy/topology-aware.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ behavior. These options can be supplied as part of the effective
- `colocateNamespaces`
- whether try to allocate containers in a namespace to the same or close by
topology pools
- `defaultCPUPriority`
- is the default CPU prioritization, used when a container has not been
annotated with any other CPU preferences. The possible values are: `high`,
`normal`, `low`, and `none`. Currently this option only affects exclusive
CPU allocations. For a more detailed discussion of CPU prioritization see
the [cpu allocator](../developers-guide/cpu-allocator.md) documentation.

## Policy CPU Allocation Preferences

Expand Down Expand Up @@ -225,7 +231,7 @@ preferences the policy would otherwise apply to them. These Pod annotations
can be given both with per pod and per container resolution. If for any
container both of these exist, the container-specific one takes precedence.

### Shared, Exclusive, and Isolated CPU Preference
### Shared, Exclusive, and Isolated CPU Preference, CPU Priorities

A container can opt in to or opt out from shared CPU allocation using the
following Pod annotation.
Expand All @@ -239,6 +245,9 @@ metadata:
prefer-shared-cpus.resource-policy.nri.io/pod: "true"
# selectively opt out container C2 from shared CPU core allocation
prefer-shared-cpus.resource-policy.nri.io/container.C2: "false"
# prefer low-prio CPUs for all others except the 'pump' container
prefer-cpu-priority.resource-policy.nri.io/pod: low
prefer-cpu-priority.resource-policy.nri.io/container.pump: high
```
Opting in to exclusive allocation happens by opting out from shared allocation,
Expand Down

0 comments on commit 5d6ebd0

Please sign in to comment.