From 5d6ebd0f9d6710bc605f1225dd872173e88c9829 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Fri, 15 Mar 2024 14:51:37 +0200 Subject: [PATCH] docs: update documentation. Signed-off-by: Krisztian Litkey --- .../resource-policy/developers-guide/cpu-allocator.md | 10 +++++++++- docs/resource-policy/policy/topology-aware.md | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/resource-policy/developers-guide/cpu-allocator.md b/docs/resource-policy/developers-guide/cpu-allocator.md index 8d7eb0419..0951e207d 100644 --- a/docs/resource-policy/developers-guide/cpu-allocator.md +++ b/docs/resource-policy/developers-guide/cpu-allocator.md @@ -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 @@ -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. diff --git a/docs/resource-policy/policy/topology-aware.md b/docs/resource-policy/policy/topology-aware.md index ec84a52d3..5ef308981 100644 --- a/docs/resource-policy/policy/topology-aware.md +++ b/docs/resource-policy/policy/topology-aware.md @@ -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 @@ -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. @@ -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,